Error AtlasError Documentation and Resolution

Microsoft Entra device code verification code is invalid

AADSTS70018: BadVerificationCode

Microsoft Entra rejected the device code flow because the user entered the wrong verification code during device authorization.

AADSTS70018authentication
AADSTS70018: BadVerificationCode
  • The user typed the wrong device verification code.
  • A stale or mismatched verification code was entered.
  • The device flow being authorized does not match the code being submitted.
  1. Start the device code sign-in flow again if needed.
  2. Enter the exact verification code shown by the app.
  3. Make sure the browser session is completing the same device flow request.
Microsoft Learn: Microsoft Entra authentication and authorization error codes
AADSTS70018 BadVerificationCode: causes and fixes | Error Atlas