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 / How to retrieve respon...
Power Automate
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?

Categories:
I have the same question (0)
  • Verified answer
    Rahber Profile Picture
    1,935 on at
    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.
  • ivanchokees Profile Picture
    6 on at

    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!

  • ivanchokees Profile Picture
    6 on at

    For reference:

    ivanchokees_0-1593590244890.png

    ivanchokees_1-1593590287060.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

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard