Occasional non-jwt access tokens.

Aashutosh Aryal 45 Reputation points
2023-11-07T07:46:11.6666667+00:00

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,953 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,454 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.