3,286 questions
Getting the V1.0 token for access token (but getting v2.0 token for id token) - Azure AD - B2B
Mathew James
26
Reputation points
Scenario:-
- Created an App registration. Exposed permission for Graph API with scopes ["openid", "profile", "offline_access", "User.Read"].
- In the Authentication blade I have configured SPA (and not Web). I have changed accessTokenAcceptedVersion = 2 (instead of null).
- I have a React app utilizing Azure AD authentication using MSAL.js 2.0 against this Client ID and tenant ID. Passing the same scopes from React App (in MSAL JS Authcofig) ["openid", "profile", "offline_access", "User.Read"].
- After successful sign in, in the access token I always get token version as 1.0 and issuer as sts.windows.net. (it also says invalid signature when pasted in jwt.io). Also we get the scopes as ["openid", "profile", "email", "User.Read"].
- its not matching with what we passed. No idea how "email" is added and "offline_access" is deleted.
- For Id token - the issuer is https://login.microsoftonline.com/{my-tenant-id}/v2.0 and token version is v2.0
- We are calling https://login.microsoftonline.com/{my-tenant-id}/v2.0/.well-known/openid-configuration
Please help me and let me know why I am not getting v2.0 tokens for access token.
Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Entra | Microsoft Entra ID
25,148 questions
Sign in to answer