Skip to content

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

@alejcas

Description

@alejcas

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions