Entra IDDeep dive

Microsoft Entra AADSTS error codes 16000–50079: the complete list with fixes (part 1 of 5)

Part 1 of the complete AADSTS list: every code from AADSTS16000 to AADSTS50079 in Microsoft's order, with its meaning, the usual cause and the first check.

Microsoft's AADSTS table is long, and the code on your screen is often one of the rarer ones. This page is part 1 of a complete, five-part version of that table: all 72 codes from AADSTS16000 to AADSTS50079, in Microsoft's order, each with a plain-English meaning, the usual cause and the first thing to check.

Codes in this quick reference

  • AADSTS16000 InteractionRequired: account from another identity provider doesn't exist in the tenantSign-in page / Microsoft Entra sign-in log
  • AADSTS16001 UserAccountSelectionInvalid: the account tile the user picked was rejectedSign-in page (account picker)
  • AADSTS16002 AppSessionSelectionInvalid: the app's session (SID) requirement wasn't metSign-in page / app error
  • AADSTS160021 AppSessionSelectionInvalidSessionNotExist: the requested user session doesn't existSign-in page / app error
  • AADSTS17003 CredentialKeyProvisioningFailed: Entra ID can't provision the user keyMicrosoft Entra sign-in log
  • AADSTS20001 WsFedSignInResponseError: problem with the federated identity providerSign-in page / Microsoft Entra sign-in log
  • AADSTS20012 WsFedMessageInvalid: invalid WS-Federation message from the federated identity providerSign-in page / Microsoft Entra sign-in log
  • AADSTS20033 FedMetadataInvalidTenantName: problem with the federated identity providerSign-in page / Microsoft Entra sign-in log

+ 45 more codes in the tables below.

How this guide is organized: How to read these codes → AADSTS16000 to AADSTS40015 → AADSTS50000 to AADSTS50015 → AADSTS50017 to AADSTS50050 → AADSTS50053 to AADSTS50079 → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these codes. 2. AADSTS16000 to AADSTS40015. 3. AADSTS50000 to AADSTS50015. 4. AADSTS50017 to AADSTS50050. 5. AADSTS50053 to AADSTS50079. 6. How to verify a fix. Toolbox: AADSTS16000, AADSTS16001, AADSTS16002, Get-MgDomainFederationConfiguration, Restrict-Access.1How to read these codes2AADSTS16000 toAADSTS400153AADSTS50000 toAADSTS500154AADSTS50017 toAADSTS500505AADSTS50053 toAADSTS500796How to verify a fixTOOLBOXAADSTS16000AADSTS16001AADSTS16002Get-MgDomainFederationConfigurati…Restrict-AccessHow this guide is organized: How to read these codes → AADSTS16000 to AADSTS40015 → AADSTS50000 to AADSTS50015 → AADSTS50017 to AADSTS50050 → AADSTS50053 to AADSTS50079 → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these codes. 2. AADSTS16000 to AADSTS40015. 3. AADSTS50000 to AADSTS50015. 4. AADSTS50017 to AADSTS50050. 5. AADSTS50053 to AADSTS50079. 6. How to verify a fix. Toolbox: AADSTS16000, AADSTS16001, AADSTS16002, Get-MgDomainFederationConfiguration, Restrict-Access.1How to read these codes2AADSTS16000 to AADSTS400153AADSTS50000 to AADSTS500154AADSTS50017 to AADSTS500505AADSTS50053 to AADSTS500796How to verify a fixTOOLBOXAADSTS16000AADSTS16001AADSTS16002Get-MgDomainFederationConfigurationRestrict-Access
At a glance: how this guide is organized · 6 sections · 5 key settings and tools

Note: The series covers Microsoft's whole AADSTS table: part 1 (16000–50079, this page), part 2 (50085–54005), part 3 (65001–81012), part 4 (90002–90130) and part 5 (120000 and above). Codes with a detailed guide on this site link to it.

How to read these codes#

Whether an AADSTS code from 16000 to 50079 needs action, and whereIs the code 50058, 50072 or 50074? if Yes: Does a success with the same correlation ID follow? if Yes: Not a failure (50058: a silent request found no session; 50072 and 50074 are interrupts); if No: Investigate it like any other code (Use its row below and the sign-in log entry for that correlation ID); if No: Is it a 20xxx or 40xxx code? if Yes: Usually fixed on the federated IdP side (These come from a federated identity provider; for AD FS, see its reference); if No: Look it up and run the Sign-in diagnostic (Launch the Sign-in diagnostic from the failed entry in the sign-in logs)Is the code 50058, 50072 or50074?Does a success with the samecorrelation ID follow?OKNot a failure50058: a silent requestfound no session; 50072and 50074 are interruptsYesFIXInvestigate it like anyother codeUse its row below and thesign-in log entry for thatcorrelation IDNoYesIs it a 20xxx or 40xxx code?FIXUsually fixed on thefederated IdP sideThese come from afederated identity provider;for AD FS, see its referenceYesFIXLook it up and run theSign-in diagnosticLaunch the Sign-indiagnostic from the failedentry in the sign-in logsNoNoWhether an AADSTS code from 16000 to 50079 needs action, and whereIs the code 50058, 50072 or 50074? if Yes: Does a success with the same correlation ID follow? if Yes: Not a failure (50058: a silent request found no session; 50072 and 50074 are interrupts); if No: Investigate it like any other code (Use its row below and the sign-in log entry for that correlation ID); if No: Is it a 20xxx or 40xxx code? if Yes: Usually fixed on the federated IdP side (These come from a federated identity provider; for AD FS, see its reference); if No: Look it up and run the Sign-in diagnostic (Launch the Sign-in diagnostic from the failed entry in the sign-in logs)Is the code 50058, 50072 or 50074?YesDoes a success with the same correlationID follow?YesOKNot a failure50058: a silent request found no session; 50072and 50074 are interruptsNoFIXInvestigate it like any other codeUse its row below and the sign-in log entry forthat correlation IDNoIs it a 20xxx or 40xxx code?YesFIXUsually fixed on the federated IdP sideThese come from a federated identity provider;for AD FS, see its referenceNoFIXLook it up and run the Sign-in diagnosticLaunch the Sign-in diagnostic from the failedentry in the sign-in logs
Figure 1 · Decision tree Whether an AADSTS code from 16000 to 50079 needs action, and where. Find the code on the sign-in page, in the sign-in logs or in the app's JSON, then answer the questions to see whether and where to act.
  • Sign-in page: the message starts with the AADSTS number; the technical details below it carry the request ID, correlation ID and timestamp. Ask users for those too.
  • Sign-in logs: in the Microsoft Entra admin center, open Entra ID › Monitoring & health › Sign-in logs (Reports Reader is enough). The sign-in error code is the number without the prefix; on a failed entry, Launch the Sign-in diagnostic runs Microsoft's guided analysis. Users can see their own attempts at mysignins.microsoft.com.
  • Apps and scripts: the token endpoint returns JSON with error, error_description (which starts with the AADSTS code), error_codes, timestamp, trace_id, correlation_id and often an error_uri.

Microsoft calls the table preliminary: codes and messages can change, so apps shouldn't depend on them. For the current wording of one code, add its number to https://login.microsoftonline.com/error?code=. Some codes aren't failures: 50058 is expected when a silent request finds no session, and interrupts such as 50072 and 50074 usually precede a success with the same correlation ID. Recent entries for any code:

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

Related: the AADSTS quick reference (common codes by area), the Intune and Jamf AADSTS reference (device-state codes) and Reading Microsoft Entra sign-in logs like an engineer.

AADSTS16000 to AADSTS40015: account picker, federation and scopes#

The 20xxx and 40xxx codes come from a federated identity provider, so the fix is usually on the IdP side; for AD FS, see the AD FS errors and event IDs reference.

CodeMeaningUsual causeFirst check
AADSTS16000 InteractionRequiredAccount from another identity provider doesn't exist in the tenant, so it can't use the appNo guest account; also common when a personal Microsoft account without a directory opens the Entra admin centerSign in with an account from the tenant, or invite the user as a guest
AADSTS16001 UserAccountSelectionInvalidThe account tile the user picked was rejectedA code defect or race condition (Microsoft's wording)Pick from the refreshed list or choose another account
AADSTS16002 AppSessionSelectionInvalidThe app's session (SID) requirement wasn't metApp asks for a session that doesn't match the signed-in oneInteractive sign-in; developers check the session hint the app sends
AADSTS160021 AppSessionSelectionInvalidSessionNotExistThe user session the app requested doesn't existSession ended before the app asked for itFresh interactive sign-in (Microsoft's note also mentions creating a new Azure account)
AADSTS16003 SsoUserAccountNotFoundInResourceTenantUser hasn't been explicitly added to the tenantGuest not invited or not redeemedGuest sign-in errors guide
AADSTS17003 CredentialKeyProvisioningFailedEntra ID can't provision the user keyService-side failure; Microsoft gives no more detailRetry; keep the correlation ID for a support case
AADSTS20001 WsFedSignInResponseErrorProblem with the federated identity provider's WS-Federation responseError at the federation server (AD FS or a third-party IdP)The IdP's logs; contact the IdP owner
AADSTS20012 WsFedMessageInvalidInvalid WS-Federation message from the federated identity providerMalformed or unexpected IdP responseIdP configuration and logs
AADSTS20033 FedMetadataInvalidTenantNameProblem with the federated identity provider (the name points to an invalid tenant name in federation metadata)Federation settings that don't match the tenantGet-MgDomainFederationConfiguration -DomainId output vs. the IdP's settings
AADSTS230109 CachedCredentialNonGWAuthNRequestsNotSupportedRequest bypassed the Microsoft Entra gateway, which the backup authentication service requiresTraffic sent straight to the backup service instead of through the reverse proxyDNS overrides, hosts files or proxy rules for sign-in endpoints
AADSTS28002Invalid scope value in the access token requestMistyped or unknown scopeThe scope string the app sends
AADSTS28003Scope can't be empty when redeeming an authorization codeToken request without a scopeAdd the scope to the code redemption
AADSTS399284 InboundIdTokenIssuerInvalidFederated ID token issuer is empty or doesn't match the realm identifierIssuer configured for the external provider differs from the token's issIssuer in the provider's token vs. your configuration
AADSTS40008 OAuth2IdPUnretryableServerErrorFederated identity provider error (not retryable)Failure at the external OAuth 2.0 identity providerThe IdP's status; contact the IdP
AADSTS40009 OAuth2IdPRefreshTokenRedemptionUserErrorFederated identity provider error while redeeming a refresh tokenIdP-side session or token problem for the userUser signs in again; contact the IdP if it repeats
AADSTS40010 OAuth2IdPRetryableServerErrorFederated identity provider error (retryable)Temporary IdP-side failureRetry; check the IdP's status
AADSTS40015 OAuth2IdPAuthCodeRedemptionUserErrorFederated identity provider error while redeeming an authorization codeIdP rejected the code exchangeIdP-side app configuration and logs

AADSTS50000 to AADSTS50015: resources, tenants, SAML and assertions#

CodeMeaningUsual causeFirst check
AADSTS50000 TokenIssuanceErrorProblem with the sign-in serviceService-side issueRetry; service health; support case with the correlation ID
AADSTS50001 InvalidResourceThe resource is disabled or doesn't existWrong resource URL or App ID URI in the appThe exact resource identifier the app requests
AADSTS50002 NotAllowedTenantSign-in blocked by restricted proxy access on the tenantTenant restrictions on the network or in your own tenant policyYour restricted-tenant settings and the proxy's allowed list
AADSTS500011 InvalidResourceServicePrincipalNotFoundResource principal not found in the tenantApp not added or consented, or the wrong tenantApp sign-in errors guide
AADSTS500014 InvalidResourceServicePrincipalDisabledThe resource's service principal is disabledLapsed subscription or an admin disabled the appAADSTS quick reference
AADSTS500021Access to the tenant denied by tenant restrictionsTenant not in the allowed listGuest sign-in errors guide
AADSTS500022Access to the tenant is denied by tenant restrictions (Microsoft describes it like 500021)Target tenant missing from the Restrict-Access-To-Tenant headerThe header your proxy injects; add the tenant if access is intended
AADSTS50003 MissingSigningKeyNo signing key or certificate configured for the appSAML app without a usable signing certificate; Microsoft also cites a corrupted application objectCreate a new SAML signing certificate, make it active, remove the unused one
AADSTS50005 DevicePolicyErrorDevice platform not supported by Conditional AccessDevice-based policy met an unsupported or unrecognized platformDevice platforms condition; user agent in the log
AADSTS50006 InvalidSignatureSignature verification failedSigned request or token whose signature doesn't verifyApp's signing certificate vs. the registered one
AADSTS50007 PartnerEncryptionCertificateMissingPartner encryption certificate not found for the appEncryption certificate missing for the appSupport case, as Microsoft advises
AADSTS50008 InvalidSamlTokenSAML assertion missing or misconfiguredThe federation provider issued a bad tokenAADSTS quick reference
AADSTS5000224 NotAllowedTenantBlockedTenantFraudThis resource isn't availableTenant blocked by Microsoft (the name refers to fraud)Contact Microsoft support
AADSTS5000819 InvalidSamlTokenEmailMissingOrInvalidEmail claim missing or wrong domain in the SAML assertionPartner's SAML/WS-Fed IdP sends no email in the federated domainThe email claim the partner's IdP issues
AADSTS50010 AudienceUriValidationFailedNo token audiences configured for the appApp has no identifier (audience) setIdentifier (Entity ID) or App ID URI
AADSTS50011 InvalidReplyToReply address missing or doesn't match the app's reply URLsRedirect URI mismatchApp sign-in errors guide
AADSTS50012 AuthenticationFailedCertificate or client assertion validation failedUnauthorized subject or thumbprint, untrusted or invalid certificate chain, bad assertion signaturePresented certificate vs. the app registration
AADSTS50013 InvalidAssertionAssertion invalid, expired or malformedIssuer and API version mismatch, expiry, or a refresh token that isn't a primary refresh tokenDecode the token the app passes; check iss, aud, exp
AADSTS500133Assertion isn't within its valid time rangeExpired access token used as the user assertion (on-behalf-of)Get a fresh token before the assertion call
AADSTS50014 GuestUserInPendingStateUser account doesn't exist in the directory (the name refers to a guest in pending state)Wrong tenant, or a guest who hasn't finished redemptionexternalUserState; add or re-invite. Guest guide
AADSTS50015 ViralUserLegalAgeConsentRequiredStateLegal age group consent requiredAccount classified as a minor without consentageGroup and consentProvidedForMinor on the user

AADSTS50017 to AADSTS50050: certificates, guests, cross-tenant and tokens#

CodeMeaningUsual causeFirst check
AADSTS50017 CertificateValidationFailedCertificate validation failedIssuing CA not trusted, or CRL problemsCBA errors guide
AADSTS500141Redemption complete, but the request wasn't started by the target appGuest redeemed outside the app's sign-in flowOpen the app directly now. Guest guide
AADSTS5001256Invalid id_token from the external identity providerExternal OIDC provider returned a token Entra ID rejectsFailure details in the message; the provider's issuer, audience and keys
AADSTS50020 UserUnauthorizedAccount from another identity provider isn't in the tenantExternal user never invitedGuest sign-in errors guide
AADSTS500207Account type can't be used for this resourceThe resource doesn't support that account typeThe app's supported account types (signInAudience)
AADSTS500208Domain isn't a valid sign-in domain for the account typeFor example, a personal Microsoft account on a work-or-school-only tenantSign in with the expected account type
AADSTS500212 NotAllowedByOutboundPolicyTenantThe user's tenant blocks outbound accessHome tenant's outbound cross-tenant settingsGuest sign-in errors guide
AADSTS500213 NotAllowedByInboundPolicyTenantThe resource tenant blocks this userResource tenant's inbound cross-tenant settingsGuest sign-in errors guide
AADSTS50027 InvalidJwtTokenJWT failed validationMissing nonce or sub, duplicate claims, wrong issuer or audience, expiry, bad format or signatureDecode the token; compare iss, aud, exp and nonce
AADSTS50029Invalid URI: the domain name contains invalid charactersTypo or unsupported characters in a URL or domainThe URLs and domains in the request
AADSTS50032 WeakRsaKeyAttempt to use a weak RSA keyCertificate or key Entra ID considers too weakReplace it with a stronger key
AADSTS50033 RetryableErrorTransient error not related to database operationsTemporary service conditionRetry with back-off
AADSTS50034 UserAccountNotFoundThe account isn't in this directoryMistyped username or the wrong tenantAADSTS quick reference
AADSTS50042 UnableToGeneratePairwiseIdentifierWithMissingSaltSalt for a pairwise identifier is missingNot documented beyond the missing saltSupport case with the correlation ID
AADSTS50043 UnableToGeneratePairwiseIdentifierWithMultipleSaltsPairwise identifier can't be generated because of multiple salts (no description in Microsoft's table)Not documentedSupport case with the correlation ID
AADSTS50048 SubjectMismatchesIssuerClient assertion subject doesn't match its issuersub and iss differ in the client assertionBoth must carry the app's client ID
AADSTS50049 NoSuchInstanceForDiscoveryUnknown or invalid instanceWrong authority host in the app or libraryThe authority URL, including the cloud
AADSTS50050 MalformedDiscoveryRequestThe discovery request is malformedApp or library built a bad discovery requestAuthority configuration and library version

AADSTS50053 to AADSTS50079: account state, sessions, sign-out and MFA#

CodeMeaningUsual causeFirst check
AADSTS50053 IdsLockedAccount locked by smart lockout, or sign-in from a malicious IP addressRepeated bad passwords or an attackSmart lockout guide
AADSTS50055 InvalidPasswordExpiredPasswordThe password has expiredPassword expiration policyAADSTS quick reference
AADSTS50056Invalid or null password: no password exists in the directory for this userEmpty password sent, or no password stored for the accountUser re-enters it; for hybrid users, check how passwords are validated
AADSTS50057 UserDisabledThe account is disabledDisabled in Entra ID, or in AD and syncedSmart lockout guide
AADSTS50058 UserInformationNotProvidedSession information not sufficient for single sign-on; the user isn't signed inExpected when a silent request (prompt=none) finds no sessionWhether the app falls back to interactive sign-in
AADSTS50059 MissingTenantRealmAndNoUserInformationProvidedNo tenant information in the request or credentialsCommon endpoint used without a username or tenantTenant-specific endpoint, or pass the UPN
AADSTS50061 SignoutInvalidRequestUnable to complete sign-out; the request was invalidMalformed logout requestThe app's logout URL and parameters
AADSTS50064 CredentialAuthenticationErrorUsername or password validation failedWrong credentials, or a failure in hybrid validationSame checks as 50126; PTA agents or federation for hybrid users
AADSTS50068 SignoutInitiatorNotParticipantThe app that started sign-out isn't in the current sessionLogout started by an app the user didn't use in this sessionThe app's single logout configuration
AADSTS50070 SignoutUnknownSessionIdentifierSign-out name identifier doesn't match an existing sessionApp sends a different NameID than it receivedNameID in the logout request
AADSTS50071 SignoutMessageExpiredThe logout request has expiredOld request, or clock skew on the app serverApp server time; send a fresh request
AADSTS50072 UserStrongAuthEnrollmentRequiredInterruptUser must register for MFA (interactive)MFA registration requiredMFA errors guide
AADSTS50074 UserStrongAuthClientAuthNRequiredInterruptMFA required and not passedInterrupt before the MFA stepMFA errors guide
AADSTS50076 UserStrongAuthClientAuthNRequiredMFA required for this resourceConditional Access, per-user MFA or a new locationMFA errors guide
AADSTS50078 UserStrongAuthExpiredPresented MFA has expired under your policiesSign-in frequency or MFA lifetimeMFA errors guide
AADSTS50079 UserStrongAuthEnrollmentRequiredMFA required; security info must be registered (federated users bring the MFA claim)First sign-in after MFA enforcementMFA errors guide

How to verify a fix#

  1. Reproduce with the same user, app and device, then open the new sign-in log entry. Success, or a different code, shows the original cause is gone.
  2. For interrupts and silent-SSO codes (50058, 50072, 50074), check the next entry with the same correlation ID; a success there means the flow worked.
  3. For app codes (28002, 50012, 50013, 50048), request a token again; app-only attempts appear under service principal sign-ins.
  4. If you stream sign-in logs to Log Analytics, confirm the code stops appearing:
KQL
SigninLogs
| where TimeGenerated > ago(7d)
| where ResultType in ("50014", "50056", "50059")
| summarize Attempts = count(), Users = dcount(UserPrincipalName) by ResultType, AppDisplayName
| order by Attempts desc

App-only failures land in AADServicePrincipalSignInLogs. When Microsoft's own advice is to contact support (50000, 50007, 50042, 5000224), open the case with the correlation ID, request ID and timestamp.

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

M365 Subject Matter Expert, 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)