I've set up use of the Send an HTTP request to Azure DevOps action that seems to always return Unauthorized. I know I've setup Azure DevOps authentication correctly because I'm also using the Azure DevOps Create a work item action and it works fine.
The unauthorized message gives me an object id of the user that is unauthorized, which is not me and does not seem to line up with any other Azure AD user we have. Could it be defaulting to a system user? Should it be working this way when it is using the same Data Connection as the Create a work item action?
Note: I tested the same Azure DevOps call through Postman and it worked correctly. So, I know for sure that I am authorized to access the api.
I was able to resolve the issue by using a (not so) relative url with a leading "/"
Entering the full URL worked for me, thanks j-i!
Anyone found a fix to this? I'm having the same issue.
Came back to this for a different project and got it to work...not sure if there was any changes to the connector or it was just my own stupidity. I had to make sure to insert the entirety of the URI, and I think I was using escape characters for spaces before (so I left actual spaces in my Team name):
I'm experiencing this as well, exactly as described in the opening post. The step for creating a work item works, but the HTTP request step gets an unauthorized error.
Did anyone figure this out? I'm facing the same issues as well.
Radio silence I'm afraid!
Same issue. Running into 'Unathorized' with this action. Was there a solution to this?
Any update on this issue?
I face the same problem:
Hey @v-bacao-msft,
I tried using a different browser in in-cognito mode to have it force me to login. I was able to switch accounts and try the old msdn one I had. That one did not work either. So, I was able then to switch back to my current account.
To update the connection I just went to Connections and did a Switch Account on the Azure DevOps connection. That did the trick in toggling it between the users.
As far as on-premise goes, we've switched over to Azure DevOps, so I shouldn't need to connect that way anymore. But, I'll admit I don't fully understand the account switch between the two.
The more I think about this issue, I feel that it is something specific with the Send an HTTP Request to Azure action. Both this action and the Create a work item action use the same Azure DevOps connection and it correctly is able to create a work item with my account. So, either the HTTP action is somehow fudging the authentication or my user account is able to create an item but not query an item. Plus, I was able to query the item from postman, so it seems it should be able to do both.
Is there any way to troubleshoot this further? Is there any Setting I may have to change for that HTTP action?
Thanks again for your response.