0
votes

I am trying to pass an API-key as an extra parameter to the redirect_uri when calling https://login.microsoftonline.com/common/oauth2/v2.0/authorize but Azure AD won't let me do it.

Is there any way to send custom data to your url after the user has signed in with Microsoft?

1

1 Answers

1
votes

Yes, this is supported now. You can add query parameters to the redirect uri.

enter image description here

Auth request

https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize?
client_id=cbc32712-ac2###32-802d-303998a6e712
&response_type=code
&redirect_uri=http://localhost/test?apikey=test
&response_mode=query
&scope=Directory.ReadWrite.All
&state=12345

The response

enter image description here

Reference:

Redirect URIs can now contain query string parameters