Occasional non-jwt access tokens.

Aashutosh Aryal 40 Reputation points

When obtaining access and id tokens from azure active directory (via nextauth), the access token comes in two different format: the standard jwt format and some other format. I have noticed that for users within my tenant, the access token is in the standard jwt format but for users that are outside my tenant, the token format is different. Both tokens work however.

User's image

The id token however seems to be the standard jwt token in every case.

Why do the tokens differ?

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,456 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
17,523 questions
{count} votes