Microsoft Entra user sign-in and session errors (AADSTS)

Look up an AADSTS error raised for a signed-in user — account not found or not in the tenant, not assigned to the app, MFA or conditional access required or blocking, compliant device required, locked or disabled accounts, expired or revoked sessions and refresh tokens, authorization codes reused — with the cause, the check and the fix, and why automation should not sign in as a user.

markdownreferencev1978F-F4CYstage: operatetrust: officialservice: entrainterface: anyAADSTS50034AADSTS50020AADSTS50105AADSTS50076AADSTS50079AADSTS53003AADSTS53000AADSTS50126AADSTS50053AADSTS50057AADSTS50055AADSTS50058AADSTS50173AADSTS70043AADSTS700082AADSTS70008AADSTS54005AADSTS50133AADSTS500021AADSTS70016interaction_requiredconditional access blockedMFA requiredrefresh token expireduser not assigned to applicationguest user not in tenant

Created 21 Oct 2026 · Modified 23 Oct 2026 · 1 version

Microsoft Entra user sign-in and session errors

These errors are about a person, their session or a tenant policy, so most can't be fixed in code. What code can do: interactively request the token when the OAuth error is interaction_required, and stop using user credentials for automation. A script, pipeline or service should sign in as a managed identity or a workload identity (guides/entra/github-actions-oidc.md), because MFA and conditional access apply to users and will break an unattended user sign-in the day an admin turns them on.

Check for every row: the Microsoft Entra sign-in logs (admin center → Sign-in logs), filtered by the correlation_id from the error response. The entry names the user, the app, the conditional access policies applied and the failure reason.

Account and assignment

CodeCause → fixCheck
AADSTS50034 UserAccountNotFoundThe account isn't in this directory: mistyped name, or the wrong tenant in the URLThe sign-in log shows the tenant the request went to
AADSTS50020 UserUnauthorizedThe account from that identity provider doesn't exist in this tenant: invite it as an external (B2B) user first, or sign in with an account of this tenantThe sign-in log; for your own app, az ad app show --id <client-id> --query signInAudience
AADSTS50105 EntitlementGrantsNotFoundThe app requires assignment and this user (or their group) isn't assigned to itThe enterprise app's Users and groups
AADSTS50126 InvalidUserNameOrPasswordWrong username or password—
AADSTS50053The account is locked after repeated failed attempts, or the sign-in came from an IP address with malicious activitySign-in log failure reason
AADSTS50057 UserDisabledThe account is disabledUser's Account enabled in the admin center
AADSTS50055 InvalidPasswordExpiredPasswordThe password expired; the user must reset it—
AADSTS500021Tenant restrictions block access to that tenant from this networkProxy / tenant restriction settings of the user's network

MFA and conditional access

CodeCause → fixCheck
AADSTS50076 UserStrongAuthClientAuthNRequiredMFA is required (a policy, per-user MFA, or a new location). Sign in interactively; for automation, switch to a workload identitySign-in log → Conditional Access tab
AADSTS50079 UserStrongAuthEnrollmentRequiredThe user must register for MFA firstSame
AADSTS53003 BlockedByConditionalAccessA conditional access policy blocked token issuanceThe sign-in log names the policy
AADSTS53000 DeviceNotCompliantA policy requires a compliant (managed) deviceDevice's compliance state
AADSTS50058 UserInformationNotProvidedNo session for silent sign-in: expected when the user isn't signed in. Fall back to interactive sign-in—

Sessions and tokens

CodeCause → fixCheck
AADSTS700082 ExpiredOrRevokedGrantInactiveTokenThe refresh token expired from inactivity: sign in again—
AADSTS70008 ExpiredOrRevokedGrantThe refresh token or grant expired or was revoked—
AADSTS50173The grant was revoked, often after a password change or reset. Get a fresh token—
AADSTS50133 SsoArtifactRevokedThe session ended after a password change or expiry—
AADSTS70043 BadTokenDueToSignInFrequencyA conditional access sign-in frequency limit ended the refresh tokenSign-in log → policy with sign-in frequency
AADSTS54005An authorization code was redeemed twice. Each code is single-use: use the refresh token afterwardsDoes your code exchange the same code on retry?
AADSTS70016 AuthorizationPendingDevice code flow: the user hasn't finished yet. Keep polling: this is not a failure—

For CLI users, az login (or az login --tenant <tenant-id>) clears most session errors; az account show confirms who is signed in.

When none of these fits

Look the code up at https://login.microsoftonline.com/error?code=<n> and read the sign-in log entry for its correlation ID. App and credential errors are in reference/entra/errors.md.

Read this document as markdown — the same bytes an agent receives.