Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Send an HTTP request to Azure DevOps returns Unauthorized

(1) ShareShare
ReportReport
Posted on by 28

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.

  • mivillani Profile Picture
    mivillani 2 on at
    Re: Send an HTTP request to Azure DevOps returns Unauthorized

    I was able to resolve the issue by using a (not so) relative url with a leading "/"

  • timhoeppner Profile Picture
    timhoeppner 3 on at
    Re: Send an HTTP request to Azure DevOps returns Unauthorized

    Entering the full URL worked for me, thanks j-i!

  • drethedev Profile Picture
    drethedev 2 on at
    Re: Send an HTTP request to Azure DevOps returns Unauthorized

    Anyone found a fix to this? I'm having the same issue.

  • j-i Profile Picture
    j-i 6 on at
    Re: Send an HTTP request to Azure DevOps returns Unauthorized

    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):

     

    j-i_0-1597295359336.png

     

  • brianjs Profile Picture
    brianjs 3 on at
    Re: Send an HTTP request to Azure DevOps returns Unauthorized

    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.

  • astockli Profile Picture
    astockli on at
    Re: Send an HTTP request to Azure DevOps returns Unauthorized

    Did anyone figure this out?  I'm facing the same issues as well.

  • Frankkil Profile Picture
    Frankkil 4 on at
    Re: Send an HTTP request to Azure DevOps returns Unauthorized

    Radio silence I'm afraid!

  • j-i Profile Picture
    j-i 6 on at
    Re: Send an HTTP request to Azure DevOps returns Unauthorized

    Same issue. Running into 'Unathorized' with this action. Was there a solution to this?

  • Frankkil Profile Picture
    Frankkil 4 on at
    Re: Send an HTTP request to Azure DevOps returns Unauthorized

    Any update on this issue?

     

    I face the same problem:

    • Azure DevOps connection works fine
    • Built-in Azure Dev Ops actions leveraging the connection work fine
    • 'Send an HTTP request to Azure DevOps' always returns 'UnAuthorized' even though the same connection is being used
  • bkelley Profile Picture
    bkelley 28 on at
    Re: Send an HTTP request to Azure DevOps returns Unauthorized

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,691

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 65,019

Leaderboard