Open selimirez opened 3 years ago
When I have seen this message it has usually been because the token presented to the token endpoint is the wrong type of token. If you acquire a refresh token and then - in a later run - use it to acquire a new access token (this is the way e.g. PHPMailer works), it is all too easy to accidentally offer the wrong token for that grant. Have you checked the token in jwt.ms? Access tokens should display formatted (leave out the initial email address and 'bearer'); refresh tokens and authorization codes are impenetrable with or without decode 64'ing.
After the user gets authenticated and the necessary information is gathered from AAD, I get the following error;
I have 2 separate files that complete the flow (not sure if this info is relevant), one file gets the code and the other completes the token generation to get the user data.
Despite getting the necessary user information and log them in it seems to proceed further and cause this exception.
I will appreciate any help
Stack Trace is as below;