0
votes

I have an App Registered in Azure Active Directory and Accounts in any organization can access the app (Multi-tenant).

I am using the following URL to request for Admin Consent.

Request:

https://login.microsoftonline.com/d1e71bad-1720-420d-81da-zzzzzzzzz/adminconsent?client_id=2073dd0f-e4f3-4c25-acbe-xxxxxxxxa&state=12345&redirect_uri=http://localhost:49573/Planner/Auth

When the user signs in and grants Admin consent, the response has values for Admin consent, TenantID and State.

Response:

http://localhost:49573/Planner/Auth?admin_consent=True&tenant=d1e71bad-1720-420d-81da-zzzzzzzzz&state=12345

Can I also get an access token in the Response during process of getting an Admin Consent

Thanks, Gagan

1

1 Answers

0
votes

In one request this only is possible for User Consents, which you can read here by sending the prompt parameter set to 'consent'.

What you need to do is chain events. The redirect URL you specify could for instance trigger a Delegated Authorization flow you need to get the job done. Be aware that this makes sense for Browser sessions, but for OAuth apps, it will not.