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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / HTTP call to create a ...
Power Automate
Answered

HTTP call to create a Personal Access Token in DevOps failing with 302

(0) ShareShare
ReportReport
Posted on by 1,304

Hey all,

 

Hope you are well.

 

I am trying to create a personal access token using this API call and an HTTP request in Power Automate:

 

Pats - Create - REST API (Azure DevOps Tokens) | Microsoft Learn

 

Jondoesflow_0-1675512619510.png

 

 

I have no auth method set, as I don't think one is required as per the documentation.  But I get this response back from thr HTTP call:

 

302:

 

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="https://spsproduks1.vssps.visualstudio.com/_signin?realm=vssps.dev.azure.com&amp;reply_to=https%3A%2F%2Fvssps.dev.azure.com%2FJonathanRussell0871%2F_apis%2Ftokens%2Fpats%3Fapi-version%3D7.0-preview.1&amp;redirect=1&amp;hid=029166d1-ef43-4902-8ccb-a2108a1f480c&amp;context=eyJodCI6MiwiaGlkIjoiYmIwMWQyNjgtZWMwYy00OGNjLWEzZmEtYzY1NzQwZmRhOGJiIiwicXMiOnt9LCJyciI6IiIsInZoIjoiIiwiY3YiOiIiLCJjcyI6IiJ90#ctx=eyJTaWduSW5Db29raWVEb21haW5zIjpbImh0dHBzOi8vbG9naW4ubWljcm9zb2Z0b25saW5lLmNvbSIsImh0dHBzOi8vbG9naW4ubWljcm9zb2Z0b25saW5lLmNvbSJdfQ2">here</a>.</h2>
</body></html>

 

Can anyone point out where I am going wrong?

 

 

Categories:
I have the same question (0)
  • JonDoesFlow Profile Picture
    1,304 on at

    In the Learn documentation in my post above, there is this part about security:

     

    Jondoesflow_0-1675514338965.png

     

     

    I don't really understand what this means, bar the auth type is Basic.

  • JonDoesFlow Profile Picture
    1,304 on at

    Pretty sure it is because of the authentication, problem is what authentication do I need to use to initiate that first HTTP call.

     

    I have used the send an http request to azure as part of the devops connector, but same issues.

  • Verified answer
    JonDoesFlow Profile Picture
    1,304 on at

    Finally worked it out. Haven’t implemented it yet. But I need to call the main MSFT endpoint to get an access token. Then I’ll be good. 

  • Kosenurm Profile Picture
    802 on at

    Hi, I'm having the same issue, could you share your solution please? Thanks.

  • JonDoesFlow Profile Picture
    1,304 on at

    To be honest. I worked out what I needed to do but never managed to implement it correctly. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard