Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

How to retrieve response URL of an HTTP request

(0) ShareShare
ReportReport
Posted on by 6

I have a GET request to retrieve an authorization code from /authorize:

https://login.microsoftonline.com/<tenantid>/oauth2/v2.0/authorize?client_id=<clientid>&response_type=code&response_mode=query&scope=https://graph.microsoft.com/.default&state=12345&redirect_uri=<uri>

When I paste this URL in a browser, it redirects me to a URL with the auth code in it:

http://<uri>?code=OAQABAAIAAAAGV_bv21oQQ4ROqh0_1-tA3gL_Fd5bpYAaB1y2NKzaLbOU0vWGAwGXks6DLoSw0b-XpHHzR479dBmDGsqgPYPLuJcv5tbZZSJPquTljjFgNgcUQvb89GEKYHiwToMsgEbR373vvnapXbmUEcUpWgD7vkAW1L_LBDHeSHmwILkFQ55dWdRfCPBLuLCe8cJU9MNid8X1AbGjv-O9nlMOtCZV5o20S_ic-ME61m6FSTt8ODN-6RCz2hfL6tIsHYHfTMLliDh3RBecdIKpvrHqPkGCAYp7Xj8w9OI5wk9O5b1iYpmgHtuUh6ux-qOpeE3YkBvi9gAt5I1HKY5nxQt2hmn9WIjnuwphtuF5eDuWuU16CXkZB77F71m_0MRZT2MXdtkweoshVP4kOr4tWBXh-AB5xeQWthGzsF5hHogw0SGu3Jzm6VF1m-dUlnm2xWQgFMQnxt6aJPHHMchkFSksUPPeDtxDtG0ZAZUTynf7B-KO3kaghP1MojXw4HG4mRraDtpqVZKVP-NaTbP-6CtnZILpgSINA5TbnSW7maIzL7L07M2mnoevWS8eHnFyuZulbdm17-YLqFpsE9bsKcgk-3pXIAA&state=12345&session_state=1f9002dc-f7e4-44a0-9f53-e7aa8c6aca2f

 This is how it looks like in MS Flow:

ivanchokees_0-1593576093511.png

How do I get the auth code from the response of this HTTP request?

  • ivanchokees Profile Picture
    6 on at
    Re: How to retrieve response URL of an HTTP request

    For reference:

    ivanchokees_0-1593590244890.png

    ivanchokees_1-1593590287060.png

     

     

  • ivanchokees Profile Picture
    6 on at
    Re: How to retrieve response URL of an HTTP request

    Awesome, this is exactly what I need! Instead of calling /authorize first, this uses /token directly through a grant_type=password and it gives me the scope that I need for my Graph API!

     

    Thank you so much!

  • Verified answer
    Rahber Profile Picture
    1,935 on at
    Re: How to retrieve response URL of an HTTP request
    Although its not a recommended approach but follow this for silent authentication.

    https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth-ropc

    P.S it wont work if you have MFA enabled on account.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow