Error AtlasError Documentation and Resolution

Microsoft Entra authorization code was already redeemed

AADSTS54005: OAuth2 Authorization code was already redeemed.

Microsoft Entra ID rejected the token request because the authorization code has already been used and cannot be redeemed again.

AADSTS54005authentication
AADSTS54005: OAuth2 Authorization code was already redeemed.
  • The same authorization code was submitted more than once.
  • The client retried token redemption with a code that had already been consumed.
  • Parallel or duplicate callback handling redeemed the code twice.
  1. Ensure the authorization code is redeemed exactly once.
  2. Start a fresh sign-in flow to obtain a new code if the old one has already been used.
  3. Check callback and retry logic for duplicate token exchange attempts.
Microsoft Entra authentication and authorization error codes
AADSTS54005 authorization code already redeemed in Microsoft Entra | Error Atlas