web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send an HTTP request t...
Power Automate
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.

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @bkelley ,

     

    Since the error message contains Unauthorized and the user mentioned in the message pointed to by Object id is not you.

    Please try to update or reconfigure the connection of Send an HTTP request to Azure DevOps action to fix an authentication error.

     

    In addition, you could consider clearing the credentials of Azure DevOps login in the browser.

     

    When I test it on my side, I find that when I update the connection, it will automatically create a connection according to the credentials saved in the browser, and we cannot specify the connection name. So the account that currently creates the connection is not clear.

     

    Hope it helps.

     

    Best Regards,

  • bkelley Profile Picture
    28 on at

    Thanks for the suggestions, @v-bacao-msft.  I gave them a shot and once I set my Internet Options to have a Security Zone of "Prompt for Username and Password" instead of "Automatic Logon only in Intranet Zone", I was able to delete my Azure DevOps connection and switch accounts.  I didn't see if it was connected to a different account, but rather just made sure I'm using the right one now.

     

    I also cleared cache several times just to be certain.  But alas, I am still getting the same Unauthorized error for the same user.

     

    It is probably worth noting that we recently switched to Azure DevOps from an on-prem Team Foundation Server setup.  So, I had an old login for MSDN that is separate from my current O365 credentials.  I have associated them now.  I'm just curious if it is somehow still pulling the old credentials instead of the new.  I'm not sure how I would check that.

  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @bkelley ,

     

    The point you mentioned may be the reason why Unauthorized is always displayed.

    Basically, as long as the current username and password can be used to log in to Azure DevOps on the browser, then a connection can be created.

    You could try using a different browser to configure a similar Flow, delete the existing connection and use the new connection.

    However, as far as I know, the current Azure DevOps connector supported by MS Flow seems to be Online Service, not On-premise data source. I am curious whether you can create a connection with Azure DevOps from an On-premise Team Foundation Server.

     

    Best Regards,

  • bkelley Profile Picture
    28 on at

    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.

  • Frankkil Profile Picture
    4 on at

    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
  • j-i Profile Picture
    6 on at

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

  • Frankkil Profile Picture
    4 on at

    Radio silence I'm afraid!

  • astockli Profile Picture
    Microsoft Employee on at

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

  • brianjs Profile Picture
    3 on at

    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.

  • j-i Profile Picture
    6 on at

    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

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 550

#2
Valantis Profile Picture

Valantis 390

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard