Karlheinz Reinhardt
Karlheinz Reinhardt

Reputation: 1075

Graph Admin Consent - Why/When to specify tenant

While reading the documentation about getting access without a user i noticed that in Step 3, in order to get the token, you need to send a get request to the following endpoint:

GET https://login.microsoftonline.com/{tenant}/adminconsent

or if the tenant is unkown to

GET https://login.microsoftonline.com/common/adminconsent

The results (redirects, confirmation of app rights, ...) are still the same.

My Question is:

Upvotes: 1

Views: 51

Answers (1)

Marc LaFleur
Marc LaFleur

Reputation: 33114

You can specify a tenant in order to restrict who can authenticate. If you provide a tenant id, only an Admin from that tenant would be able to consent to your application. Using common allows any Admin, from any tenant, to consent to your application.

In practice, you rarely need to specify a tenant.

Upvotes: 2

Related Questions