invalid_grant: Server rejected the supplied grant
The server rejected the supplied grant.
What to check
- Start a new authorisation when the code or token is no longer usable, and check the PKCE verifier if the failure occurs at code exchange.
Official reference
Microsoft Learn: Handling authentication errors in your application