Error AtlasError Documentation and Resolution

Microsoft Entra device code expired before authorization completed

AADSTS70019: CodeExpired

Microsoft Entra rejected the device code flow because the verification code expired before the user finished authorization.

AADSTS70019authentication
AADSTS70019: CodeExpired
  • The device verification code expired before the user completed sign-in.
  • The authorization process took too long.
  • An expired device flow was retried instead of starting a new one.
  1. Start a fresh device code sign-in flow.
  2. Complete the browser authorization promptly before the new code expires.
  3. Ensure the app handles expired device codes by restarting the flow.
Microsoft Learn: Microsoft Entra authentication and authorization error codes
AADSTS70019 CodeExpired: causes and fixes | Error Atlas