Entra IDDeep dive

AADSTS error codes 65001–81012: the complete list with fixes (part 3 of 5)

Every AADSTS code Microsoft lists from 65001 to 81012: consent, client credentials and grants, SAML, pass-through authentication and Seamless SSO, with cause and first check.

This is part 3 of my complete AADSTS reference: every code Microsoft lists from AADSTS65001 to AADSTS81012, in the order of Microsoft's table. The range covers consent, client credentials and token grants, SAML requests, pass-through authentication and Seamless single sign-on. Each row gives the meaning in plain English, the usual cause and the first thing to check, and links to a detailed guide where this site already has one.

Codes in this quick reference

  • AADSTS65002: first-party app and API need preauthorization (a Microsoft-owned app ID was reused)App error / token response
  • AADSTS650052: the app needs a service your organization hasn't subscribed to or enabledConsent prompt / Microsoft Entra sign-in log
  • AADSTS650054: the app asks for permissions to a resource that was removed or is no longer availableConsent prompt / Microsoft Entra sign-in log
  • AADSTS67003 ActorNotValidServiceIdentity: the actor isn't a valid service identityApp error / token response
  • AADSTS70000 InvalidGrant: the refresh token isn't valid (token binding header or hash)App error / token response
  • AADSTS70001 UnauthorizedClient: the application is disabledSign-in page / Microsoft Entra sign-in log
  • AADSTS700011 UnauthorizedClientAppNotFoundInOrgIdTenant: client app not found in the directorySign-in page / token response
  • AADSTS700025 InvalidClientPublicClientWithCredential: a public client sent a secret or assertionToken response / sign-in log

+ 30 more codes in the tables below.

How this guide is organized: How to read these codes → Consent and permissions → Clients, grants and tokens → SAML requests → Pass-through authentication → Seamless single sign-on → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these codes. 2. Consent and permissions. 3. Clients, grants and tokens. 4. SAML requests. 5. Pass-through authentication. 6. Seamless single sign-on. 7. How to verify a fix. Toolbox: AADSTS65001, AADSTS65002, AADSTS65004, klist, AuthenticationAgent › Admin.1How to read thesecodes2Consent andpermissions3Clients, grants andtokens4SAML requests5Pass-throughauthentication6Seamless singlesign-on7How to verify a fixTOOLBOXAADSTS65001AADSTS65002AADSTS65004klistAuthenticationAgent › AdminHow this guide is organized: How to read these codes → Consent and permissions → Clients, grants and tokens → SAML requests → Pass-through authentication → Seamless single sign-on → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these codes. 2. Consent and permissions. 3. Clients, grants and tokens. 4. SAML requests. 5. Pass-through authentication. 6. Seamless single sign-on. 7. How to verify a fix. Toolbox: AADSTS65001, AADSTS65002, AADSTS65004, klist, AuthenticationAgent › Admin.1How to read these codes2Consent and permissions3Clients, grants and tokens4SAML requests5Pass-through authentication6Seamless single sign-on7How to verify a fixTOOLBOXAADSTS65001AADSTS65002AADSTS65004klistAuthenticationAgent › Admin
At a glance: how this guide is organized · 7 sections · 5 key settings and tools

Note: The series: part 1 (16000–50079), part 2 (50085–54005), part 3 (this page), part 4 (90002–90130) and part 5 (120000 and above). The most common codes are also on one page in the AADSTS quick reference.

How to read these codes#

Where a code from 65001 to 81012 surfaces and which side fixes itWhich range is the code in? if 65xxx to 70xxx: Is it an app-only sign-in? if Yes: Check the Service principal sign-ins tab (App-only sign-ins don't appear on the user tab); if No: Read the app's error page or token JSON (Consent, client and grant codes usually surface in the app); if 75xxx to 76xxx: Fix the service provider's SAML settings (Capture the SAML request and compare it with the app's Single sign-on page); if 80xxx or 81xxx: Is it pass-through authentication (80xxx)? if Yes: Check the Authentication Agent (Per-sign-in reasons are in the agent's trace logs); if No, Seamless SSO: Check Kerberos for Seamless SSO (Work through the checklist in the Seamless SSO section)Which range is the code in?Is it an app-only sign-in?NOTECheck theService principalsign-ins tabApp-only sign-insdon't appear on theuser tabYesNOTERead the app'serror page ortoken JSONConsent, client andgrant codes usuallysurface in the appNo65xxx to 70xxxFIXFix the serviceprovider's SAMLsettingsCapture the SAMLrequest and compareit with the app'sSingle sign-on page75xxx to 76xxxIs it pass-throughauthentication (80xxx)?FIXCheck theAuthenticationAgentPer-sign-in reasonsare in the agent'strace logsYesFIXCheck Kerberosfor Seamless SSOWork through thechecklist in theSeamless SSOsectionNo, Seamless SSO80xxx or 81xxxWhere a code from 65001 to 81012 surfaces and which side fixes itWhich range is the code in? if 65xxx to 70xxx: Is it an app-only sign-in? if Yes: Check the Service principal sign-ins tab (App-only sign-ins don't appear on the user tab); if No: Read the app's error page or token JSON (Consent, client and grant codes usually surface in the app); if 75xxx to 76xxx: Fix the service provider's SAML settings (Capture the SAML request and compare it with the app's Single sign-on page); if 80xxx or 81xxx: Is it pass-through authentication (80xxx)? if Yes: Check the Authentication Agent (Per-sign-in reasons are in the agent's trace logs); if No, Seamless SSO: Check Kerberos for Seamless SSO (Work through the checklist in the Seamless SSO section)Which range is the code in?65xxx to 70xxxIs it an app-only sign-in?YesNOTECheck the Service principal sign-ins tabApp-only sign-ins don't appear on the user tabNoNOTERead the app's error page or token JSONConsent, client and grant codes usually surfacein the app75xxx to 76xxxFIXFix the service provider's SAML settingsCapture the SAML request and compare it with theapp's Single sign-on page80xxx or 81xxxIs it pass-through authentication (80xxx)?YesFIXCheck the Authentication AgentPer-sign-in reasons are in the agent's trace logsNo, Seamless SSOFIXCheck Kerberos for Seamless SSOWork through the checklist in the Seamless SSOsection
Figure 1 · Decision tree Where a code from 65001 to 81012 surfaces and which side fixes it. Start from the code's range: it tells you where users see it and which side holds the fix.
  • Consent, client and grant codes (65xxx–70xxx) usually surface in the app: an error page after the Microsoft sign-in screen, or the error_description in the token endpoint's JSON response. App-only sign-ins appear on the Service principal sign-ins tab of the sign-in logs, not on the user tab.
  • SAML codes (75xxx–76xxx) appear on the Microsoft sign-in page when someone opens a SAML app. The fix is nearly always in the service provider's settings, so capture the SAML request in the browser's developer tools and compare it with the app's Single sign-on page in Entra.
  • Pass-through authentication (80xxx) and Seamless SSO (81xxx) codes come from your on-premises side: the Authentication Agent or Kerberos. Users see them on the sign-in page; the sign-in log shows the number as the sign-in error code.

Microsoft notes that codes and messages can change. For the current wording of one code, add its number to https://login.microsoftonline.com/error?code=. To find who is hitting a code, query the sign-in logs:

PowerShell
Connect-MgGraph -Scopes "AuditLog.Read.All","Directory.Read.All"
Get-MgAuditLogSignIn -Filter "status/errorCode eq 80002" -Top 25 |
    Select-Object CreatedDateTime, UserPrincipalName, AppDisplayName,
        @{n='Reason';e={$_.Status.FailureReason}}
CodeMeaningUsual causeFirst check
AADSTS65001 DelegationDoesNotExistNo user or admin consent for this app and resourcePermissions never granted, or consent removedGrant consent or use the admin consent workflow. Guide
AADSTS65002Consent between a Microsoft first-party app and a first-party API must be set up through preauthorizationSomeone in your tenant reused an app ID that belongs to MicrosoftRegister your own app and use its client ID
AADSTS65004 UserDeclinedConsentThe user declined the consent promptCancel was selected on the permissions pageRetry and accept, or grant admin consent. Guide
AADSTS65005 MisconfiguredApplicationThe requested access doesn't match the app's required resource list, or the resource can't be foundWrong API permissions; for SAML apps, the wrong Identifier (Entity ID)Requested scopes against API permissions. Guide
AADSTS650052The app needs a service your organization hasn't subscribed to or enabledNo subscription for that service, or the service is turned offSubscription for the service named in the message
AADSTS650054The app asks for permissions to a resource that was removed or is no longer availableThe registration still lists a deleted APIRemove or replace that API under API permissions
AADSTS650056Misconfigured app: no permissions listed for the resource, no admin consent, a wrong client ID or an invalid certificateIncomplete registration or missing consentPermissions and consent status. Guide
AADSTS650057Invalid resource: it isn't among the app's requested permissionsThe API was never added to the registrationAdd it under API permissions. Guide

Clients, grants and tokens (67003–70043)#

CodeMeaningUsual causeFirst check
AADSTS67003 ActorNotValidServiceIdentityThe actor in the request isn't a valid service identityMicrosoft publishes no further detailCollect the correlation ID for the developer or Microsoft support
AADSTS70000 InvalidGrantThe refresh token isn't valid: empty token binding header or binding hash mismatchThe stored token no longer matches its bindingSign in interactively; escalate to the developer if it repeats
AADSTS70001 UnauthorizedClientThe application is disabledThe app or its service principal was disabledApp status in Enterprise apps
AADSTS700011 UnauthorizedClientAppNotFoundInOrgIdTenantNo app with that client ID exists in the directoryWrong client ID or tenant, or the app was never addedClient ID and tenant in the app's settings
AADSTS70002 InvalidClientCredential validation failed: the client_secret doesn't matchWrong, old or truncated secretSecret in the app's settings. Guide
AADSTS700025 InvalidClientPublicClientWithCredentialA public client must not send client_assertion or client_secretA desktop or mobile app sends a credentialDrop the credential, or use a confidential (web) registration
AADSTS700027The client assertion failed signature validationSigned with a certificate the registration doesn't holdCertificate thumbprints. Guide
AADSTS70003 UnsupportedGrantTypeThe grant type isn't supportedTypo, or a flow the endpoint doesn't offergrant_type in the token request
AADSTS700030Invalid certificate: its subject name isn't authorized (the message lists up to 10 names)Certificate not trusted for this appSubject names in the message against the app's trust settings
AADSTS70004 InvalidRedirectUriThe redirect URI matches no configured address and nothing on the OIDC approved listredirect_uri differs from the registrationExact URI under Authentication
AADSTS70005 UnsupportedResponseTypeUnsupported response type: token not enabled, or id_token without the openid scopeImplicit grant off, or scope missingImplicit grant settings and the scope parameter
AADSTS700054Response type id_token isn't enabled for the appID tokens not selected under implicit grantAuthentication › Implicit grant and hybrid flows. Quick reference
AADSTS70007 UnsupportedResponseModeThe response_mode value isn't supportedThe app sends a mode the flow doesn't acceptresponse_mode in the request
AADSTS70008 ExpiredOrRevokedGrantThe refresh token expired after a period of inactivityApp unused for a long timeSign in interactively again
AADSTS700082 ExpiredOrRevokedGrantInactiveTokenThe refresh token expired due to inactivityExpected token lifecycleSign in again. Guide
AADSTS700084A refresh token issued to a single-page app reached its fixed lifetime, which can't be extendedExpected for SPAsThe SPA must send a new sign-in request
AADSTS70011 InvalidScopeThe requested scope is invalidMalformed scope, or one the API doesn't exposescope value, such as https://graph.microsoft.com/.default
AADSTS70012 MsaServerErrorServer error while authenticating a personal Microsoft accountTransient service problemRetry; open a support case if it continues
AADSTS70016 AuthorizationPendingDevice code flow: authorization is still pendingExpected while the user finishesKeep polling. Quick reference
AADSTS70018 BadVerificationCodeDevice code flow: the user typed the wrong codeTypo, or a code from another sessionEnter the exact code shown
AADSTS70019 CodeExpiredThe verification code expiredThe user took too longStart again. Quick reference
AADSTS70043 BadTokenDueToSignInFrequencyRefresh token expired or invalid because of a Conditional Access sign-in frequency checkSign-in frequency session controlThe policy's sign-in frequency. Guide

SAML requests (75001–76026)#

CodeMeaningUsual causeFirst check
AADSTS75001 BindingSerializationErrorAn error occurred during SAML message bindingMalformed or wrongly encoded SAML messageCapture and decode the SAML request
AADSTS75003 UnsupportedBindingErrorThe SAML response can only be sent with the HTTP POST bindingThe app asks for another response bindingThe app's reply URL must accept POST
AADSTS75005 Saml2MessageInvalidEntra doesn't support the SAML request the app sentMalformed or unsupported AuthnRequestDecoded request against the app's SAML settings
AADSTS7500514No supported SAML response type: Entra expects Response (protocol namespace) or Assertion (assertion namespace)App-side message errorThe app developer fixes the message
AADSTS750054SAMLRequest or SAMLResponse must be query-string parameters for the Redirect bindingParameter missing, or the wrong bindingThe app's sign-on URL and binding settings
AADSTS75008 RequestDeniedErrorRequest denied: the SAML request had an unexpected destinationDestination doesn't match the Entra endpointDestination in the AuthnRequest
AADSTS75011 NoMatchedAuthnContextInOutputClaimsThe user's authentication method doesn't match the requested oneThe app demands a specific authentication contextRequestedAuthnContext in the request. Quick reference
AADSTS75016 Saml2AuthenticationRequestInvalidNameIDPolicyThe SAML request has an invalid NameIdPolicyThe app asks for an unsupported NameID formatNameIDPolicy format against the app's Name ID claim
AADSTS76021 ApplicationRequiresSignedRequestsThe app requires signed requests but this one wasn't signedSigning required in Entra, not done by the appRequest signing in the app, or the verification certificate setting
AADSTS76026 RequestIssueTimeExpiredThe IssueTime in the SAML request has expiredWrong clock on the app server, or a stale requestApp server time; start a fresh sign-in

Pass-through authentication (80001–80014)#

Agent events are in Event Viewer under Applications and Services Logs › Microsoft › AzureAdConnect › AuthenticationAgent › Admin; per-sign-in reasons are in the trace logs under %ProgramData%\Microsoft\Azure AD Connect Authentication Agent\Trace\.

CodeMeaningUsual causeFirst check
AADSTS80001 OnPremiseStoreIsNotAvailableThe Authentication Agent can't connect to Active Directory (the log may say no agent is available)Agents down, or no domain controller reachableAgent status, then AD connectivity. Quick reference
AADSTS80002 OnPremisePasswordValidatorRequestTimedoutThe password validation request timed outAD slow or unreachable from the agentDomain controller reachability from each agent
AADSTS80005 OnPremisePasswordValidatorUnpredictableWebExceptionUnknown error while processing the agent's responseTransientRetry; open a support case if it persists
AADSTS80007 OnPremisePasswordValidatorErrorOccurredOnPremThe agent can't validate the user's passwordCommunication problem with ADAgent Admin log and DC health. Quick reference
AADSTS80010 OnPremisePasswordValidationEncryptionExceptionThe agent can't decrypt the passwordDamaged agent registrationIf it repeats, register a new agent and uninstall the old one
AADSTS80012 OnPremisePasswordValidationAccountLogonInvalidHoursSign-in outside the logon hours set in ADLogon Hours restriction on the accountThe account's logon hours in AD
AADSTS80013 OnPremisePasswordValidationTimeSkewTime skew between the agent server and ADClock driftw32tm /query /status on the agent
AADSTS80014 OnPremisePasswordValidationAuthenticationAgentTimeoutThe agent answered after the maximum allowed timeOverloaded agent or slow ADSupport case with the code, correlation ID and timestamp

Also listed on Microsoft's pass-through authentication troubleshooting page#

CodeMeaningUsual causeFirst check
AADSTS80003Invalid response received by the Authentication AgentAD configuration, if many users are affectedAD configuration and the agent trace log
AADSTS80004The username passed to the agent isn't valid (incorrect UPN)The user typed the wrong usernameSign in with the correct UPN
AADSTS80011The agent can't retrieve the decryption keyAgent registration problemIf it repeats, register a new agent and uninstall the old one

Watch out: Microsoft warns against disabling pass-through authentication or uninstalling agents while users can't sign in unless you have a cloud-only Hybrid Identity Administrator account to fall back on. If accounts use the AD "Logon To" restriction, add the agent servers to that list.

Seamless single sign-on (81004–81012)#

CodeMeaningUsual causeFirst check
AADSTS81004 DesktopSsoIdentityInTicketIsNotAuthenticatedThe Kerberos authentication attempt failedAny item on the checklist belowWork through the checklist. Guide
AADSTS81005 DesktopSsoAuthenticationPackageNotSupportedThe authentication package isn't supportedThe browser offered a package Seamless SSO can't useKerberos checklist below
AADSTS81006 DesktopSsoNoAuthorizationHeaderNo authorization header was foundThe browser sent no Kerberos ticketIntranet zone, domain-joined device, corporate network
AADSTS81007 DesktopSsoTenantIsNotOptInThe tenant isn't enabled for Seamless SSOFeature off or never finishedFeature status in Entra Connect. Guide
AADSTS81009 DesktopSsoAuthorizationHeaderValueWithBadFormatThe user's Kerberos ticket can't be validatedA Kerberos ticket problemChecklist below. Guide
AADSTS81010 DesktopSsoAuthTokenInvalidThe Kerberos ticket expired or isn't validNot on a domain-joined device inside the networkSign in from a domain-joined device on the network. Guide
AADSTS81011 DesktopSsoLookupUserBySidFailedNo user object matches the information in the ticketUser not synced to Entra IDSync the user with Entra Connect. Guide
AADSTS81012 DesktopSsoMismatchBetweenTokenUpnAndChosenUpnThe user signing in differs from the user signed in to the deviceShared or borrowed deviceSign in from the user's own device. Guide

Microsoft's Seamless SSO checklist: the device is joined to AD and on the corporate network; the user signed in with a domain account from a forest where the feature is enabled; https://autologon.microsoftazuread-sso.com is in the Local intranet zone (not Trusted sites); clocks are within five minutes; and the AZUREADSSOACC computer account exists and is enabled. The same page also lists sign-in codes 81001 (Kerberos ticket too large: reduce group memberships) and 81002, 81003 and 81008 (ticket can't be validated), which the Seamless SSO guide above covers.

How to verify a fix#

  1. Repeat the same sign-in with the same user, app and client, then find the new attempt by correlation ID. Good: Success, or a different code if one problem was hiding another.
  2. Consent: the app's Permissions page under Enterprise apps lists the granted permissions, and the next sign-in shows no consent prompt.
  3. Client credentials: request a token with the app's own credential and confirm a success on the Service principal sign-ins tab.
  4. Pass-through authentication: on an agent server, test the same credentials outside the cloud flow:
    PowerShell
    Import-Module "C:\Program Files\Microsoft Azure AD Connect Authentication Agent\Modules\PassthroughAuthPSModule\PassthroughAuthPSModule.psd1"
    Invoke-PassthroughAuthOnPremLogonTroubleshooter
    If it returns the same username or password error, the agent works; Microsoft points to a non-routable on-premises UPN as the likely cause.
  5. Seamless SSO: run klist purge, browse to the app again, then klist should list a ticket issued for the AZUREADSSOACC account.
  6. If sign-in logs go to Log Analytics, watch the codes fall away:
    KQL
    SigninLogs
    | where TimeGenerated > ago(7d)
    | where ResultType in ("80002", "80005", "80013", "81006", "81010")
    | summarize Failures = count() by ResultType, ResultDescription, bin(TimeGenerated, 1d)

For the fields in each entry, see Reading Microsoft Entra sign-in logs like an engineer.

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)