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:
How do I get the auth code from the response of this HTTP request?
For reference:
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!
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional