Description
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