Entra IDDeep dive

Microsoft Entra AADSTS error codes: a quick reference with meanings and fixes

Look up 56 Microsoft Entra AADSTS codes by area, from passwords, lockout and MFA to consent, app registrations, tokens, B2B and hybrid sign-in, with the usual cause and the first check.

Every refused or interrupted Microsoft Entra sign-in comes with an AADSTS code, and the code usually tells you which side to look at: the user, the policy, the app or the partner tenant. This quick reference covers 56 common codes, grouped by area, with Microsoft's meaning, the usual cause and the first thing to check.

Codes in this quick reference

  • AADSTS50034 UserAccountNotFound: the account isn't in this directorySign-in page / Microsoft Entra sign-in log
  • AADSTS50126 InvalidUserNameOrPassword: wrong username or passwordSign-in page / Microsoft Entra sign-in log
  • AADSTS50053 IdsLocked: account locked by smart lockout, or sign-in from a malicious IP addressSign-in page / Microsoft Entra sign-in log
  • AADSTS50055 InvalidPasswordExpiredPassword: the password has expiredSign-in page / Microsoft Entra sign-in log
  • AADSTS50144 InvalidPasswordExpiredOnPremPassword: the Active Directory password has expiredSign-in page / Microsoft Entra sign-in log
  • AADSTS50057 UserDisabled: the user account is disabledSign-in page / Microsoft Entra sign-in log
  • AADSTS50135 PasswordChangeCompromisedPassword: password change required due to account riskSign-in page / Microsoft Entra sign-in log
  • AADSTS50142: password change required by a Conditional Access policySign-in page / Microsoft Entra sign-in log

+ 48 more codes in the tables below.

How this guide is organized: How to read these codes → Accounts, passwords and lockout → MFA and authentication methods → Conditional Access, security defaults and risk → Consent and permissions → App registrations and client credentials → Tokens and sessions → B2B, tenants and cross-tenant access → Federation, pass-through authentication and certificates → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these codes. 2. Accounts, passwords and lockout. 3. MFA and authentication methods. 4. Conditional Access, security defaults and risk. 5. Consent and permissions. 6. App registrations and client credentials. 7. Tokens and sessions. 8. B2B, tenants and cross-tenant access. 9. Federation, pass-through authentication and certificates. 10. How to verify a fix. Toolbox: AADSTS50034, AADSTS50126, AADSTS50053, error_description, error_codes.1How to readthese codes2Accounts,passwords an…3MFA andauthenticatio…4ConditionalAccess, securi…5Consent andpermissions6Appregistrations…7Tokens andsessions8B2B, tenantsand cross-ten…9Federation,pass-through…10How to verify afixTOOLBOXAADSTS50034AADSTS50126AADSTS50053error_descriptionerror_codesHow this guide is organized: How to read these codes → Accounts, passwords and lockout → MFA and authentication methods → Conditional Access, security defaults and risk → Consent and permissions → App registrations and client credentials → Tokens and sessions → B2B, tenants and cross-tenant access → Federation, pass-through authentication and certificates → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these codes. 2. Accounts, passwords and lockout. 3. MFA and authentication methods. 4. Conditional Access, security defaults and risk. 5. Consent and permissions. 6. App registrations and client credentials. 7. Tokens and sessions. 8. B2B, tenants and cross-tenant access. 9. Federation, pass-through authentication and certificates. 10. How to verify a fix. Toolbox: AADSTS50034, AADSTS50126, AADSTS50053, error_description, error_codes.1How to read these codes2Accounts, passwords and lockout3MFA and authentication methods4Conditional Access, security defaults and risk5Consent and permissions6App registrations and client credentials7Tokens and sessions8B2B, tenants and cross-tenant access9Federation, pass-through authentication andcertificates10How to verify a fixTOOLBOXAADSTS50034AADSTS50126AADSTS50053error_descriptionerror_codes
At a glance: how this guide is organized · 10 sections · 5 key settings and tools

How to read these codes#

Which side an AADSTS code points toIs it an interrupt that asks for MFA, consent or a device proof? if Yes: Check the next entry first (A success often follows an MFA, consent or device prompt.); if No: Which side does the code's group point to? if User: Check the account and its methods (Passwords, lockout, expiry and MFA registration.); if Policy: Open the Conditional Access tab (Then What If; 70043 and 70046 are policy working as designed.); if App or partner: Is it in the B2B and cross-tenant group? if Yes: Check cross-tenant access settings (500213 is your inbound policy; 500212 the guest's tenant.); if No: Check the app registration and consent (Secrets, redirect URIs, API permissions and assignment.)Is it an interrupt that asks forMFA, consent or a deviceproof?OKCheck the nextentry firstA success oftenfollows an MFA,consent or deviceprompt.YesWhich side does the code'sgroup point to?FIXCheck theaccount and itsmethodsPasswords, lockout,expiry and MFAregistration.UserFIXOpen theConditionalAccess tabThen What If; 70043and 70046 are policyworking as designed.PolicyIs it in the B2B andcross-tenant group?FIXCheckcross-tenantaccess settings500213 is yourinbound policy;500212 the guest'stenant.YesFIXCheck the appregistration andconsentSecrets, redirectURIs, APIpermissions andassignment.NoApp or partnerNoWhich side an AADSTS code points toIs it an interrupt that asks for MFA, consent or a device proof? if Yes: Check the next entry first (A success often follows an MFA, consent or device prompt.); if No: Which side does the code's group point to? if User: Check the account and its methods (Passwords, lockout, expiry and MFA registration.); if Policy: Open the Conditional Access tab (Then What If; 70043 and 70046 are policy working as designed.); if App or partner: Is it in the B2B and cross-tenant group? if Yes: Check cross-tenant access settings (500213 is your inbound policy; 500212 the guest's tenant.); if No: Check the app registration and consent (Secrets, redirect URIs, API permissions and assignment.)Is it an interrupt that asks for MFA, consent ora device proof?YesOKCheck the next entry firstA success often follows an MFA, consent or deviceprompt.NoWhich side does the code's group point to?UserFIXCheck the account and its methodsPasswords, lockout, expiry and MFA registration.PolicyFIXOpen the Conditional Access tabThen What If; 70043 and 70046 are policyworking as designed.App or partnerIs it in the B2B and cross-tenant group?YesFIXCheck cross-tenant access settings500213 is your inbound policy; 500212 theguest's tenant.NoFIXCheck the app registration andconsentSecrets, redirect URIs, API permissions andassignment.
Figure 1 · Decision tree Which side an AADSTS code points to. Rule out interrupts first, then use the code's group to decide whether to look at the user, the policy, the app or the partner tenant.
  • Sign-in page: the code and a short message. More details adds the request ID, correlation ID and timestamp; ask users for them.
  • Sign-in logs (Entra ID › Monitoring & health › Sign-in logs): the number without the prefix, the failure reason and the Conditional Access and Authentication Details tabs. App-only sign-ins are on the Service principal sign-ins tab.
  • Apps and scripts: the token endpoint returns JSON with error, error_description, error_codes, correlation_id and an error_uri.

Some codes are interrupts, not failures: Entra ID asks for MFA, consent or a device proof and a success often follows, so check the next entry first. Microsoft says codes and messages can change; for the current text, add the number to https://login.microsoftonline.com/error?code=. Device-state codes (53000, 53001, 50155, 135011 and others) are in the Intune and Jamf AADSTS quick reference.

PowerShell
Connect-MgGraph -Scopes "AuditLog.Read.All","Directory.Read.All"
Get-MgAuditLogSignIn -Filter "status/errorCode eq 50126" -Top 20 |
    Select-Object CreatedDateTime, UserPrincipalName, AppDisplayName, IPAddress,
        @{n='Reason';e={$_.Status.FailureReason}}

Accounts, passwords and lockout#

CodeMeaningUsual causeFirst check
AADSTS50034 UserAccountNotFoundThe account isn't in this directoryMistyped username, wrong tenant, or an external user never addedUPN and tenant in the URL; invite outsiders as guests
AADSTS50126 InvalidUserNameOrPasswordWrong username or passwordTypos, a stale saved password, or password sprayIP address and client app of the failures. Guide
AADSTS50053 IdsLockedLocked by smart lockout, or blocked from a malicious IP addressRepeated bad passwords or an attackFailure reason in the log. Guide
AADSTS50055 InvalidPasswordExpiredPasswordThe password has expiredPassword expiration policyUser changes it at sign-in or with SSPR
AADSTS50144 InvalidPasswordExpiredOnPremPasswordThe Active Directory password has expiredAD password policy (PTA, federation or writeback)Reset in AD or SSPR with writeback. Guide
AADSTS50057 UserDisabledThe account is disabledDisabled in Entra ID, or in AD and syncedRe-enable where the account is mastered
AADSTS50135 PasswordChangeCompromisedPasswordPassword change required because of account riskID Protection user riskRisky users report. Guide
AADSTS50142A Conditional Access policy requires a password changeUser risk policy with the password change controlUser needs working MFA to complete the change

MFA and authentication methods#

CodeMeaningUsual causeFirst check
AADSTS50076 UserStrongAuthClientAuthNRequiredMFA is required for this resourceConditional Access, per-user MFA or a new locationRetry interactively. Guide
AADSTS50079 UserStrongAuthEnrollmentRequiredMFA required; security info must be registered (federated users must bring the MFA claim)First sign-in after MFA enforcementRegistration settings; Temporary Access Pass
AADSTS500121Authentication failed during the MFA requestPrompt denied, timed out or not completedAuthentication Details tab
AADSTS50088Limit on telecom MFA calls reachedToo many phone or SMS attemptsWait a few minutes; move users to Authenticator
AADSTS53004 ProofUpBlockedDueToRiskMFA registration needed but blocked by riskA risky session tried to register methodsInvestigate the risk; issue a Temporary Access Pass
AADSTS50158 ExternalSecurityChallengeExternal challenge not satisfied yetTerms of use or an external MFA providerWhether a later entry succeeded

Conditional Access, security defaults and risk#

CodeMeaningUsual causeFirst check
AADSTS53003 BlockedByConditionalAccessA policy doesn't allow token issuanceA Block grant matched location, platform, client app or riskConditional Access tab, then What If. Guide
AADSTS530035 BlockedBySecurityDefaultsBlocked by security defaultsLegacy authentication or an unsafe requestMove the client to modern authentication
AADSTS53011User blocked due to risk in their home tenantA guest flagged as risky by their own organizationTheir admin remediates the risk
AADSTS70043 BadTokenDueToSignInFrequencyRefresh token expired under sign-in frequencyConditional Access sign-in frequencyExpected re-authentication. Guide
AADSTS70046Session expired or a reauthentication check failedExpired session, or reauthentication required for risky sign-insSign in again; review reauthentication policies
CodeMeaningUsual causeFirst check
AADSTS65001 DelegationDoesNotExistNo consent for this app, user and resourceA non-interactive request before any consentGrant admin consent. Guide
AADSTS90094Admin consent required ("Need admin approval")Admin-only permissions, restricted user consent or a risky appReview the app; consent or approve the request
AADSTS90093Permissions the user isn't authorized to grantRestricted user consentAdmin consent or the consent workflow
AADSTS65004 UserDeclinedConsentThe user declined consentCanceled promptRetry and accept, if the app is approved
AADSTS65005 MisconfiguredApplicationRequested access doesn't match the app or resourceResource missing in the tenant, or a wrong SAML IdentifierAPI permissions; SAML Identifier (Entity ID)
AADSTS650056Misconfigured applicationPermission not listed or not consented, wrong app ID or certificateAPI permissions and consent status
AADSTS650057Invalid resource: not in the app's requested permissionsCode asks for an API missing from the registrationAdd the API permission. Guide
AADSTS50105 EntitlementGrantsNotFoundUser isn't assigned to the appAssignment required, user not in an assigned groupEnterprise app › Users and groups

App registrations and client credentials#

CodeMeaningUsual causeFirst check
AADSTS7000215Invalid client secretSecret ID used instead of the value, or a stale secretCertificates & secrets. Guide
AADSTS7000222The client secret has expiredNo rotation before the end dateNew secret, update every consumer
AADSTS70002 InvalidClientClient credentials couldn't be validatedThe secret doesn't match the expected valueCorrect the secret in the request
AADSTS700016 UnauthorizedClient_DoesNotMatchRequestApplication not found in the directoryWrong client ID or tenant, or app not added to the tenantApp ID, authority URL, service principal
AADSTS700027Client assertion failed signature validationCertificate missing, expired or different from the signing oneCompare thumbprints
AADSTS50011 InvalidReplyToRedirect URI doesn't match the registrationURI missing or different (scheme, host, path, slash)App registration › Authentication
AADSTS500011 InvalidResourceServicePrincipalNotFoundResource not found in the tenantAPI not added to the tenant, a typo, or the wrong tenantScope value; the API's service principal
AADSTS500014 InvalidResourceServicePrincipalDisabledThe resource's service principal is disabledA lapsed subscription or an admin disabled itEnterprise app properties
AADSTS50194App isn't multitenant; /common isn't supportedSingle-tenant app using the common endpointTenant-specific endpoint, or make it multitenant
AADSTS700054response_type 'id_token' isn't enabledID tokens not enabled for implicit flowAuthentication › Implicit grant and hybrid flows

Tokens and sessions#

CodeMeaningUsual causeFirst check
AADSTS700082 ExpiredOrRevokedGrantInactiveTokenRefresh token expired through inactivityApp unused for a long timeSign in again; expected
AADSTS50173Grant revoked; a fresh token is neededPassword changed or reset, or sessions revokedSign in with the new password
AADSTS50133 SsoArtifactRevokedSession invalid after a password expiry or changePassword changed elsewhereSign in again; update saved credentials
AADSTS70016 / AADSTS70019Device code flow: authorization pending, or code expiredUser hasn't finished, or took too longPending is normal while polling; restart if expired
AADSTS50196 LoopDetectedClient loop detectedApp requests the same token repeatedly without cachingFix token caching in the app

B2B, tenants and cross-tenant access#

CodeMeaningUsual causeFirst check
AADSTS50020 UserUnauthorizedAccount from another identity provider isn't in the tenantNot invited, wrong account, or a single-tenant appGuest object and the account used. Guide
AADSTS90072External account isn't in the tenant, so MFA can't be satisfiedWrong account, or invitation not redeemedGuest's ExternalUserState
AADSTS16003 SsoUserAccountNotFoundInResourceTenantUser not explicitly added to the tenantNever invitedInvite the user
AADSTS500212 NotAllowedByOutboundPolicyTenantThe user's tenant blocks outbound accessHome tenant outbound settingsThe guest's admin
AADSTS500213 NotAllowedByInboundPolicyTenantThe resource tenant's policy blocks this userInbound B2B collaboration settingsYour cross-tenant access settings
AADSTS500021Access to the tenant denied by tenant restrictionsThe user's network limits which tenants can be usedThe user's IT allows your tenant

Federation, pass-through authentication and certificates#

CodeMeaningUsual causeFirst check
AADSTS50008 InvalidSamlTokenSAML assertion missing or misconfiguredThe federation provider issued a bad tokenFederation provider claims and signing certificate
AADSTS80001 OnPremiseStoreIsNotAvailablePTA agent can't connect to Active DirectoryAgent outside the users' forest, or AD unreachableAgent status in Entra Connect; DC connectivity
AADSTS80007 OnPremisePasswordValidatorErrorOccurredOnPremPTA agent can't validate the passwordAn error in on-premises ADAgent logs and AD health
AADSTS81007 DesktopSsoTenantIsNotOptInTenant isn't enabled for Seamless SSOFeature not turned onSeamless SSO status. Guide
AADSTS81009Kerberos ticket couldn't be validatedSeamless SSO computer account or Kerberos issueAZUREADSSOACC account and intranet zone
AADSTS50017 CertificateValidationFailedCertificate validation failedIssuing CA not trusted, or CRL download problemsCA trust and CRL settings. Guide
AADSTS50192 RawCredentialExpectedNotFoundNo credential in the requestNo certificate sent during CBA, or a proxy removed itClient certificate prompt and proxies
AADSTS75011 NoMatchedAuthnContextInOutputClaimsAuthentication method doesn't match the one requestedSAML app requests a specific authentication contextThe app's requested authentication context

How to verify a fix#

  1. Reproduce with the same user, app and client, then find the new entry by correlation ID. It should show Success, or a different code if one problem was hiding another.
  2. For interrupts (MFA, consent), confirm the next entry completes without the same code.
  3. For apps, request a token again and check the Service principal sign-ins tab.
  4. If sign-in logs are sent to Log Analytics, watch the code disappear:
KQL
SigninLogs
| where TimeGenerated > ago(2d)
| where ResultType == "50126"
| summarize Failures = count() by bin(TimeGenerated, 1h)

For app-only codes, use the AADServicePrincipalSignInLogs table instead. Reading Microsoft Entra sign-in logs like an engineer explains the fields.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

Intune Subject Matter Expert in Cairo, Egypt, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)