Skip to content
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

Oauthlib not catching error: CompactToken validation failed with reason code: 80049228 #867

Open
alejcas opened this issue Nov 7, 2023 · 1 comment

Comments

@alejcas
Copy link

alejcas commented Nov 7, 2023

I use oauthlib to authenticate with MS Graph. When the MS Graph token is expired oauthlib raises the TokenExpiredError and I use that to request a new token with the refresh token.
Recently (don't know why) I've been receiving a requests HttpError with the following message:

401 Client Error: Unauthorized for url: https://graph.microsoft.com/v1.0/me/messages?%24top=1
Error Message: CompactToken validation failed with reason code: 80049228.

When searching for this error message I see that this is returned by Ms Graph: InvalidAuthenticationToken

See this https://stackoverflow.com/questions/53992822/compacttoken-validation-failed-80049228

Shouldn't oauthlib return a InvalidTokenError or something like this?

Thanks

@auvipy
Copy link
Contributor

auvipy commented Nov 13, 2023

would you mind help reproduce this and possibly come with a draft working fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants