Public Keys to decode Azure AD (all microsoft accounts) Access tokens

Gautam Manoharan 11 Reputation points
2021-08-09T05:35:58.067+00:00

I am trying to decode the Access tokens and ID tokens generated by Azure Active Directory.

I have been successful with the single tenant apps, but when decoding this type of app:

Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)

I cannot find the public key corresponding to the "kid" I receive in the jwt header.

I have tried searching through the following discovery urls:

https://login.microsoftonline.com/{tenant_id}/discovery/keys
https://login.microsoftonline.com/common/discovery/keys
https://login.microsoftonline.com/{tenant_id}/discovery/keys?appid={client_id}

Please help me with the discovery url or the public key to use for these type of apps where the user can use any microsoft user account to sign in.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,473 questions
{count} votes