invalid_grant :: AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token on authorize request

Angel Martin Sanchez 0 Reputation points
2024-08-27T13:19:02.26+00:00

Good evening,

I'm experiencing some issues with the SSO process using the OIDC protocol.When I send the following request:

https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/authorize?client_id={client_id}&nonce={nonce}&redirect_uri={uri}&response_mode=query&response_type=code&scope=openid%20email

I receive this response:

invalid_grant :: AADSTS54005: OAuth2 Authorization code was already redeemed. Please retry with a new valid code or use an existing refresh token.

Does anyone have insights into this issue?

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,401 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.