-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid JWT access token #2386
Comments
From the stack trace, it looks like the error originates here: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/2.8.0/src/Authentication/Authentication.Core/Utilities/JwtHelpers.cs#L79
|
Thanks for following up on this. It does appear that the access token issued by the STS for personal accounts is not a JWT and does not comply with https://tools.ietf.org/html/rfc7519, hence the error. The SDK needs to be modified to only decode the access token when it is a JWT (work and school accounts are used). See related question at https://stackoverflow.com/questions/66210139/why-my-valid-ms-access-token-cant-be-parsed-with-jwt-ms for more details. |
Describe the bug
Authenticating with a personal account throws an
Invalid JWT access token
error.To Reproduce
Connect-MgGraph -Scopes "User.Read" -TenantId consumers
Expected behavior
Authentication succeeds.
Debug Output
Module Version
Environment Data
The text was updated successfully, but these errors were encountered: