Organization administrators have an option to "Consent on behalf of your organization".
This feature enables them to give consent for all users within the organization. As a result, users of the organization can sign up without needing to provide individual consent. In Microsoft documentation, this is referred to as admin consent.
Is it possible to check if organization-wide consent was given using any of the following sources:
You can list oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user.
oAuth2PermissionGranthas the propertyconsentTypewhich indicates if authorization is granted for the client application to impersonate all users (tenant-wide) or only a specific user.Possible values of the
consentTypeproperty are:AllPrincipals- tenant-wide consentPrincipal- consent for a specific userYou can filter permission grants by
consentTypeThe response looks like this
It can return more records for a specific
clientIdif some sets of permissions have been granted during time.To find details about the client app, use
clientIdin the request