Hi all, just been working on this problem. I'm presuming that you're using AAD B2C flows since I get the same kid. Try using this url - https://{tenant}.b2clogin.com/{tenant}.onmicrosoft.com/{policy-name} /discovery/v2.0/keys (policy name could B2C_1_SignIn for example). This should give the metadata of the user flow. Which should also include jwk_url, which should also have the correct key inside. :)
Public Keys to decode Azure AD (all microsoft accounts) Access tokens
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.