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 responseAADSTS650052: the app needs a service your organization hasn't subscribed to or enabledConsent prompt / Microsoft Entra sign-in logAADSTS650054: the app asks for permissions to a resource that was removed or is no longer availableConsent prompt / Microsoft Entra sign-in logAADSTS67003 ActorNotValidServiceIdentity: the actor isn't a valid service identityApp error / token responseAADSTS70000 InvalidGrant: the refresh token isn't valid (token binding header or hash)App error / token responseAADSTS70001 UnauthorizedClient: the application is disabledSign-in page / Microsoft Entra sign-in logAADSTS700011 UnauthorizedClientAppNotFoundInOrgIdTenant: client app not found in the directorySign-in page / token responseAADSTS700025 InvalidClientPublicClientWithCredential: a public client sent a secret or assertionToken response / sign-in log
+ 30 more codes in the tables below.
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#
- Consent, client and grant codes (65xxx–70xxx) usually surface in the app: an error page after the Microsoft sign-in screen, or the
error_descriptionin 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:
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}}Consent and permissions (65001–650057)#
| Code | Meaning | Usual cause | First check |
|---|---|---|---|
AADSTS65001 DelegationDoesNotExist | No user or admin consent for this app and resource | Permissions never granted, or consent removed | Grant consent or use the admin consent workflow. Guide |
AADSTS65002 | Consent between a Microsoft first-party app and a first-party API must be set up through preauthorization | Someone in your tenant reused an app ID that belongs to Microsoft | Register your own app and use its client ID |
AADSTS65004 UserDeclinedConsent | The user declined the consent prompt | Cancel was selected on the permissions page | Retry and accept, or grant admin consent. Guide |
AADSTS65005 MisconfiguredApplication | The requested access doesn't match the app's required resource list, or the resource can't be found | Wrong API permissions; for SAML apps, the wrong Identifier (Entity ID) | Requested scopes against API permissions. Guide |
AADSTS650052 | The app needs a service your organization hasn't subscribed to or enabled | No subscription for that service, or the service is turned off | Subscription for the service named in the message |
AADSTS650054 | The app asks for permissions to a resource that was removed or is no longer available | The registration still lists a deleted API | Remove or replace that API under API permissions |
AADSTS650056 | Misconfigured app: no permissions listed for the resource, no admin consent, a wrong client ID or an invalid certificate | Incomplete registration or missing consent | Permissions and consent status. Guide |
AADSTS650057 | Invalid resource: it isn't among the app's requested permissions | The API was never added to the registration | Add it under API permissions. Guide |
Clients, grants and tokens (67003–70043)#
| Code | Meaning | Usual cause | First check |
|---|---|---|---|
AADSTS67003 ActorNotValidServiceIdentity | The actor in the request isn't a valid service identity | Microsoft publishes no further detail | Collect the correlation ID for the developer or Microsoft support |
AADSTS70000 InvalidGrant | The refresh token isn't valid: empty token binding header or binding hash mismatch | The stored token no longer matches its binding | Sign in interactively; escalate to the developer if it repeats |
AADSTS70001 UnauthorizedClient | The application is disabled | The app or its service principal was disabled | App status in Enterprise apps |
AADSTS700011 UnauthorizedClientAppNotFoundInOrgIdTenant | No app with that client ID exists in the directory | Wrong client ID or tenant, or the app was never added | Client ID and tenant in the app's settings |
AADSTS70002 InvalidClient | Credential validation failed: the client_secret doesn't match | Wrong, old or truncated secret | Secret in the app's settings. Guide |
AADSTS700025 InvalidClientPublicClientWithCredential | A public client must not send client_assertion or client_secret | A desktop or mobile app sends a credential | Drop the credential, or use a confidential (web) registration |
AADSTS700027 | The client assertion failed signature validation | Signed with a certificate the registration doesn't hold | Certificate thumbprints. Guide |
AADSTS70003 UnsupportedGrantType | The grant type isn't supported | Typo, or a flow the endpoint doesn't offer | grant_type in the token request |
AADSTS700030 | Invalid certificate: its subject name isn't authorized (the message lists up to 10 names) | Certificate not trusted for this app | Subject names in the message against the app's trust settings |
AADSTS70004 InvalidRedirectUri | The redirect URI matches no configured address and nothing on the OIDC approved list | redirect_uri differs from the registration | Exact URI under Authentication |
AADSTS70005 UnsupportedResponseType | Unsupported response type: token not enabled, or id_token without the openid scope | Implicit grant off, or scope missing | Implicit grant settings and the scope parameter |
AADSTS700054 | Response type id_token isn't enabled for the app | ID tokens not selected under implicit grant | Authentication › Implicit grant and hybrid flows. Quick reference |
AADSTS70007 UnsupportedResponseMode | The response_mode value isn't supported | The app sends a mode the flow doesn't accept | response_mode in the request |
AADSTS70008 ExpiredOrRevokedGrant | The refresh token expired after a period of inactivity | App unused for a long time | Sign in interactively again |
AADSTS700082 ExpiredOrRevokedGrantInactiveToken | The refresh token expired due to inactivity | Expected token lifecycle | Sign in again. Guide |
AADSTS700084 | A refresh token issued to a single-page app reached its fixed lifetime, which can't be extended | Expected for SPAs | The SPA must send a new sign-in request |
AADSTS70011 InvalidScope | The requested scope is invalid | Malformed scope, or one the API doesn't expose | scope value, such as https://graph.microsoft.com/.default |
AADSTS70012 MsaServerError | Server error while authenticating a personal Microsoft account | Transient service problem | Retry; open a support case if it continues |
AADSTS70016 AuthorizationPending | Device code flow: authorization is still pending | Expected while the user finishes | Keep polling. Quick reference |
AADSTS70018 BadVerificationCode | Device code flow: the user typed the wrong code | Typo, or a code from another session | Enter the exact code shown |
AADSTS70019 CodeExpired | The verification code expired | The user took too long | Start again. Quick reference |
AADSTS70043 BadTokenDueToSignInFrequency | Refresh token expired or invalid because of a Conditional Access sign-in frequency check | Sign-in frequency session control | The policy's sign-in frequency. Guide |
SAML requests (75001–76026)#
| Code | Meaning | Usual cause | First check |
|---|---|---|---|
AADSTS75001 BindingSerializationError | An error occurred during SAML message binding | Malformed or wrongly encoded SAML message | Capture and decode the SAML request |
AADSTS75003 UnsupportedBindingError | The SAML response can only be sent with the HTTP POST binding | The app asks for another response binding | The app's reply URL must accept POST |
AADSTS75005 Saml2MessageInvalid | Entra doesn't support the SAML request the app sent | Malformed or unsupported AuthnRequest | Decoded request against the app's SAML settings |
AADSTS7500514 | No supported SAML response type: Entra expects Response (protocol namespace) or Assertion (assertion namespace) | App-side message error | The app developer fixes the message |
AADSTS750054 | SAMLRequest or SAMLResponse must be query-string parameters for the Redirect binding | Parameter missing, or the wrong binding | The app's sign-on URL and binding settings |
AADSTS75008 RequestDeniedError | Request denied: the SAML request had an unexpected destination | Destination doesn't match the Entra endpoint | Destination in the AuthnRequest |
AADSTS75011 NoMatchedAuthnContextInOutputClaims | The user's authentication method doesn't match the requested one | The app demands a specific authentication context | RequestedAuthnContext in the request. Quick reference |
AADSTS75016 Saml2AuthenticationRequestInvalidNameIDPolicy | The SAML request has an invalid NameIdPolicy | The app asks for an unsupported NameID format | NameIDPolicy format against the app's Name ID claim |
AADSTS76021 ApplicationRequiresSignedRequests | The app requires signed requests but this one wasn't signed | Signing required in Entra, not done by the app | Request signing in the app, or the verification certificate setting |
AADSTS76026 RequestIssueTimeExpired | The IssueTime in the SAML request has expired | Wrong clock on the app server, or a stale request | App 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\.
| Code | Meaning | Usual cause | First check |
|---|---|---|---|
AADSTS80001 OnPremiseStoreIsNotAvailable | The Authentication Agent can't connect to Active Directory (the log may say no agent is available) | Agents down, or no domain controller reachable | Agent status, then AD connectivity. Quick reference |
AADSTS80002 OnPremisePasswordValidatorRequestTimedout | The password validation request timed out | AD slow or unreachable from the agent | Domain controller reachability from each agent |
AADSTS80005 OnPremisePasswordValidatorUnpredictableWebException | Unknown error while processing the agent's response | Transient | Retry; open a support case if it persists |
AADSTS80007 OnPremisePasswordValidatorErrorOccurredOnPrem | The agent can't validate the user's password | Communication problem with AD | Agent Admin log and DC health. Quick reference |
AADSTS80010 OnPremisePasswordValidationEncryptionException | The agent can't decrypt the password | Damaged agent registration | If it repeats, register a new agent and uninstall the old one |
AADSTS80012 OnPremisePasswordValidationAccountLogonInvalidHours | Sign-in outside the logon hours set in AD | Logon Hours restriction on the account | The account's logon hours in AD |
AADSTS80013 OnPremisePasswordValidationTimeSkew | Time skew between the agent server and AD | Clock drift | w32tm /query /status on the agent |
AADSTS80014 OnPremisePasswordValidationAuthenticationAgentTimeout | The agent answered after the maximum allowed time | Overloaded agent or slow AD | Support case with the code, correlation ID and timestamp |
Also listed on Microsoft's pass-through authentication troubleshooting page#
| Code | Meaning | Usual cause | First check |
|---|---|---|---|
AADSTS80003 | Invalid response received by the Authentication Agent | AD configuration, if many users are affected | AD configuration and the agent trace log |
AADSTS80004 | The username passed to the agent isn't valid (incorrect UPN) | The user typed the wrong username | Sign in with the correct UPN |
AADSTS80011 | The agent can't retrieve the decryption key | Agent registration problem | If 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)#
| Code | Meaning | Usual cause | First check |
|---|---|---|---|
AADSTS81004 DesktopSsoIdentityInTicketIsNotAuthenticated | The Kerberos authentication attempt failed | Any item on the checklist below | Work through the checklist. Guide |
AADSTS81005 DesktopSsoAuthenticationPackageNotSupported | The authentication package isn't supported | The browser offered a package Seamless SSO can't use | Kerberos checklist below |
AADSTS81006 DesktopSsoNoAuthorizationHeader | No authorization header was found | The browser sent no Kerberos ticket | Intranet zone, domain-joined device, corporate network |
AADSTS81007 DesktopSsoTenantIsNotOptIn | The tenant isn't enabled for Seamless SSO | Feature off or never finished | Feature status in Entra Connect. Guide |
AADSTS81009 DesktopSsoAuthorizationHeaderValueWithBadFormat | The user's Kerberos ticket can't be validated | A Kerberos ticket problem | Checklist below. Guide |
AADSTS81010 DesktopSsoAuthTokenInvalid | The Kerberos ticket expired or isn't valid | Not on a domain-joined device inside the network | Sign in from a domain-joined device on the network. Guide |
AADSTS81011 DesktopSsoLookupUserBySidFailed | No user object matches the information in the ticket | User not synced to Entra ID | Sync the user with Entra Connect. Guide |
AADSTS81012 DesktopSsoMismatchBetweenTokenUpnAndChosenUpn | The user signing in differs from the user signed in to the device | Shared or borrowed device | Sign 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#
- 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.
- Consent: the app's Permissions page under Enterprise apps lists the granted permissions, and the next sign-in shows no consent prompt.
- Client credentials: request a token with the app's own credential and confirm a success on the Service principal sign-ins tab.
- Pass-through authentication: on an agent server, test the same credentials outside the cloud flow:
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.PowerShell
Import-Module "C:\Program Files\Microsoft Azure AD Connect Authentication Agent\Modules\PassthroughAuthPSModule\PassthroughAuthPSModule.psd1" Invoke-PassthroughAuthOnPremLogonTroubleshooter - Seamless SSO: run
klist purge, browse to the app again, thenklistshould list a ticket issued for the AZUREADSSOACC account. - 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#
- Microsoft Entra authentication and authorization error codes (Microsoft Learn): the source table for every code on this page.
- Troubleshoot Microsoft Entra pass-through authentication (Microsoft Learn): sign-in failure reasons, agent logs and the troubleshooter.
- Troubleshoot Microsoft Entra seamless single sign-on (Microsoft Learn): failure codes and the client checklist.

