Entra IDDeep dive

AADSTS error codes 120000 and above: password change, NGC, devices and more (part 5 of 5)

Every AADSTS code from 120000 to the end of Microsoft's table: password change and SSPR, Windows Hello (NGC) and device keys, device registration and the late app codes, with fixes.

Part 5 closes my complete AADSTS reference: every code in Microsoft's table from AADSTS120000 onward, plus the codes Microsoft lists at the end of the table out of numeric order. They cover password change and self-service password reset, Windows Hello for Business (NGC) and device keys, device registration and certificates, and a set of newer app, scope and external identity provider codes. Each row gives the meaning in plain English, the usual cause and the first check.

Codes in this quick reference

  • AADSTS120000 PasswordChangeIncorrectCurrentPassword: the current password was entered incorrectlyPassword change or reset page
  • AADSTS120002 PasswordChangeInvalidNewPasswordWeak: the new password is too weakPassword change or reset page
  • AADSTS120003 PasswordChangeInvalidNewPasswordContainsMemberName: new password contains the user's namePassword change or reset page
  • AADSTS120004 PasswordChangeOnPremComplexity: new password fails on-premises AD complexity rulesPassword change or reset page
  • AADSTS120005 PasswordChangeOnPremSuccessCloudFail: changed on-premises but the cloud step failedPassword change or reset page
  • AADSTS120008 PasswordChangeAsyncJobStateTerminated: a non-retryable error occurredPassword change or reset page
  • AADSTS120011 PasswordChangeAsyncUpnInferenceFailed: the user's UPN couldn't be inferredPassword change or reset page
  • AADSTS120012 PasswordChangeNeedsToHappenOnPrem: the password must be changed on-premisesPassword change or reset page

+ 44 more codes in the tables below.

How this guide is organized: How to read these codes → Password change and SSPR → Windows Hello for Business and device keys → Requests, sessions, devices and certificates → Codes at the end of Microsoft's table → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these codes. 2. Password change and SSPR. 3. Windows Hello for Business and device keys. 4. Requests, sessions, devices and certificates. 5. Codes at the end of Microsoft's table. 6. How to verify a fix. Toolbox: AADSTS120000, AADSTS120002, AADSTS120003, dsregcmd /status, Devices › All devices.1How to read these codes2Password change and SSPR3Windows Hello for Businessand device keys4Requests, sessions, devicesand certificates5Codes at the end of Microsoft'stable6How to verify a fixTOOLBOXAADSTS120000AADSTS120002AADSTS120003dsregcmd /statusDevices › All devicesHow this guide is organized: How to read these codes → Password change and SSPR → Windows Hello for Business and device keys → Requests, sessions, devices and certificates → Codes at the end of Microsoft's table → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these codes. 2. Password change and SSPR. 3. Windows Hello for Business and device keys. 4. Requests, sessions, devices and certificates. 5. Codes at the end of Microsoft's table. 6. How to verify a fix. Toolbox: AADSTS120000, AADSTS120002, AADSTS120003, dsregcmd /status, Devices › All devices.1How to read these codes2Password change and SSPR3Windows Hello for Business and device keys4Requests, sessions, devices and certificates5Codes at the end of Microsoft's table6How to verify a fixTOOLBOXAADSTS120000AADSTS120002AADSTS120003dsregcmd /statusDevices › All devices
At a glance: how this guide is organized · 6 sections · 5 key settings and tools

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

How to read these codes#

Where to start for a code from 120000 onwardWhat was happening when the code appeared? if Password change: Is the user synced with password writeback? if Yes: Start on-premises (AD password policy, a locked account or the writeback connection); if No: Use the password change and SSPR table (New passwords are also checked against the banned password lists); if Device sign-in: Start on the device with dsregcmd /status (Healthy: AzureAdPrt and NgcSet read YES, DeviceAuthStatus reads SUCCESS); if App or token call: App or token error at the end of the table (It comes back in the token response or shows on the Service principal sign-ins tab)What was happening when thecode appeared?Is the user synced withpassword writeback?FIXStart on-premisesAD password policy, alocked account or thewriteback connectionYesNOTEUse the passwordchange and SSPR tableNew passwords are alsochecked against the bannedpassword listsNoPassword changeFIXStart on the device withdsregcmd /statusHealthy: AzureAdPrt andNgcSet read YES,DeviceAuthStatus readsSUCCESSDevice sign-inNOTEApp or token error atthe end of the tableIt comes back in the tokenresponse or shows on theService principal sign-instabApp or token callWhere to start for a code from 120000 onwardWhat was happening when the code appeared? if Password change: Is the user synced with password writeback? if Yes: Start on-premises (AD password policy, a locked account or the writeback connection); if No: Use the password change and SSPR table (New passwords are also checked against the banned password lists); if Device sign-in: Start on the device with dsregcmd /status (Healthy: AzureAdPrt and NgcSet read YES, DeviceAuthStatus reads SUCCESS); if App or token call: App or token error at the end of the table (It comes back in the token response or shows on the Service principal sign-ins tab)What was happening when the code appeared?Password changeIs the user synced with passwordwriteback?YesFIXStart on-premisesAD password policy, a locked account or thewriteback connectionNoNOTEUse the password change and SSPR tableNew passwords are also checked against thebanned password listsDevice sign-inFIXStart on the device with dsregcmd /statusHealthy: AzureAdPrt and NgcSet read YES,DeviceAuthStatus reads SUCCESSApp or token callNOTEApp or token error at the end of the tableIt comes back in the token response or shows on theService principal sign-ins tab
Figure 1 · Decision tree Where to start for a code from 120000 onward. Start from what the user or app was doing when the code appeared; the tables below give the meaning and first check for each code.
  • Password change codes (120xxx) appear while a user changes or resets a password: after an expiry prompt at sign-in, on the change-password page or in self-service password reset (SSPR). For synced users with password writeback, many start on-premises: AD password policy, a locked account or the writeback connection. New passwords are also checked against Microsoft Entra Password Protection's banned password lists.
  • Windows Hello for Business and device codes (130xxx–135xxx) come from device-based sign-ins on Windows. Start on the device: dsregcmd /status shows the device state, the SSO state and the Windows Hello prerequisite check.
  • The codes at the end of Microsoft's table were added out of numeric order. Most are app and token errors that come back in the token response or show on the Service principal sign-ins tab.
Command Prompt
dsregcmd /status | findstr /i "AzureAdJoined DomainJoined AzureAdPrt NgcSet DeviceAuthStatus"

On a healthy joined device with Windows Hello set up, AzureAdPrt and NgcSet read YES and DeviceAuthStatus reads SUCCESS.

Password change and SSPR (120000–120021)#

CodeMeaningUsual causeFirst check
AADSTS120000 PasswordChangeIncorrectCurrentPasswordThe current password entered for the change is wrongTypo, or the user forgot itRetry, or reset it with SSPR
AADSTS120002 PasswordChangeInvalidNewPasswordWeakThe new password is too weakFails the strength or banned-password checksA longer, less predictable password
AADSTS120003 PasswordChangeInvalidNewPasswordContainsMemberNameThe new password contains the user's nameName or account name in the passwordA password without name parts
AADSTS120004 PasswordChangeOnPremComplexityThe new password fails on-premises AD complexity rulesDomain or fine-grained password policyLength, complexity, history and minimum age in AD
AADSTS120005 PasswordChangeOnPremSuccessCloudFailThe change succeeded on-premises but failed in the cloudSync or writeback problem after the AD changeEntra Connect health; test which password works. Guide
AADSTS120008 PasswordChangeAsyncJobStateTerminatedA non-retryable error occurredThe change job was terminatedAudit log entry; support case if it repeats
AADSTS120011 PasswordChangeAsyncUpnInferenceFailedThe user's UPN couldn't be inferred for the changeUnexpected user name or UPNThe UPN in Entra ID and in AD
AADSTS120012 PasswordChangeNeedsToHappenOnPremThe password has to be changed on-premisesWriteback not available for this userChange it in AD, or enable writeback. Guide
AADSTS120013 PasswordChangeOnPremisesConnectivityFailureThe on-premises side couldn't be reached for the changeWriteback connectivity from the sync serverEntra Connect or Cloud Sync health. Guide
AADSTS120014 PasswordChangeOnPremUserAccountLockedOutOrDisabledThe on-premises account is locked out or disabledAD lockout or a disabled accountUnlock or enable it in AD
AADSTS120015 PasswordChangeADAdminActionRequiredAn Active Directory administrator must act on the accountAn AD-side condition the user can't fixThe AD account and the writeback account's permissions
AADSTS120016 PasswordChangeUserNotFoundBySsprSSPR couldn't find the userWrong user name, or the user isn't in Entra IDThe user exists and is in scope for SSPR
AADSTS120018 PasswordChangePasswordDoesnotComplyFuzzyPolicyThe password fails the fuzzy-matching policyToo close to a banned passwordAvoid banned terms and simple variations of them
AADSTS120020 PasswordChangeFailureThe password change failedGeneric failureAudit log details
AADSTS120021 PartnerServiceSsprInternalServiceErrorInternal error in the SSPR partner serviceService-sideRetry; support case if it persists

For SSPR and writeback event IDs, see the SSPR and password writeback error codes.

Windows Hello for Business and device keys (130004–135011)#

CodeMeaningUsual causeFirst check
AADSTS130004 NgcKeyNotFoundThe user has no NGC (Windows Hello) ID key configuredWindows Hello key not registered for the userNgcSet in dsregcmd /status; set up Windows Hello again
AADSTS130005 NgcInvalidSignatureNGC key signature verification failedA problem with the Windows Hello key on the deviceReset Windows Hello on the device and provision it again
AADSTS130006 NgcTransportKeyNotFoundThe NGC transport key isn't configured on the deviceIncomplete device registrationDevice state in dsregcmd /status; re-register if broken
AADSTS130007 NgcDeviceIsDisabledThe device is disabledDevice object disabled in Entra IDEnable it under Entra ID › Devices › All devices
AADSTS130008 NgcDeviceIsNotFoundThe device referenced by the NGC key wasn't foundDevice object deleted from Entra IDRejoin the device, then set up Windows Hello again. Guide
AADSTS135010 KeyNotFoundKey not found; Microsoft gives no more detailNot documentedDevice details in the sign-in log and dsregcmd /status
AADSTS135011The device used during authentication is disabledDevice object disabled in Entra IDEnable it; the audit log shows who disabled it. See the Intune device AADSTS codes

Tip: If you run a stale-device clean-up, check it didn't disable or delete devices people still use before you rejoin anything. The device clean-up guide covers the safe order, and the PRT guide explains the SSO state.

Requests, sessions, devices and certificates (140000–240004)#

CodeMeaningUsual causeFirst check
AADSTS140000 InvalidRequestNonceThe request nonce wasn't providedClient or broker sent an incomplete requestUpdate the client app or broker and retry
AADSTS140001 InvalidSessionKeyThe session key isn't validNot documented furtherOn Windows, AzureAdPrt in dsregcmd /status
AADSTS165004The message content is runtime specific; see the returned exceptionVariesRead the full exception text
AADSTS165900 InvalidApiRequestInvalid requestMalformed requestCapture the request
AADSTS220450 UnsupportedAndroidWebViewVersionThe Chrome WebView version isn't supportedOutdated Android System WebViewUpdate Android System WebView and Chrome from Google Play
AADSTS220501 InvalidCrlDownloadInvalid certificate revocation list (CRL) download during certificate-based authenticationCRL distribution point unreachable or a bad responseCRL URL reachability. Guide
AADSTS221000 DeviceOnlyTokensNotSupportedByResourceThe resource isn't configured to accept device-only tokensA device-only token sent to that resourceWhether the resource supports device-only tokens
AADSTS240001 BulkAADJTokenUnauthorizedThe user isn't authorized to register devices in Entra IDThe account behind the bulk enrollment token can't join devicesDevice settings: who may join devices and the maximum number of devices per user
AADSTS240002 RequiredClaimIsMissingAn id_token can't be used as a jwt-bearer grantOn-behalf-of exchange started with an ID tokenSend the access token issued to the middle-tier API
AADSTS240003Unexpected result from the authorize endpoint callNot documented furtherCapture the authorize request and response
AADSTS240004No authorization code came back from the authorize endpoint (the message carries the error)The authorize step failed firstThe error details in the message

Codes at the end of Microsoft's table#

CodeMeaningUsual causeFirst check
AADSTS501621 ClaimsTransformationTimeoutRegularExpressionTimeoutA regular-expression replacement in a claims transformation timed outRegex too complexSimplify it under Attributes & Claims; a retry may succeed
AADSTS530032 BlockedByConditionalAccessOnSecurityPolicyA security policy the tenant admin configured blocks the requestTenant-level security policyWhich policy applied, in the sign-in log entry
AADSTS700016 UnauthorizedClient_DoesNotMatchRequestThe app wasn't found in the directory or tenantWrong client ID or tenant, or the app was never addedClient ID and tenant. Guide
AADSTS700020 InteractionRequiredThe access grant requires interactionA silent request needs the userFall back to interactive sign-in
AADSTS700022 InvalidMultipleResourcesScopeThe scope contains more than one resourceScopes for two APIs in one requestOne resource per token request
AADSTS700023 InvalidResourcelessScopeThe scope value isn't valid for an access token requestScope without a resourceFully qualified scopes, such as https://graph.microsoft.com/User.Read
AADSTS7000215Invalid client secretWrong or expired secret valueThe secret in the app's settings. Guide
AADSTS7000218The request body must contain client_assertion or client_secretA confidential-client request without a credential, or a public-client flow the app doesn't allowAdd the credential, or set Allow public client flows under Authentication. Example: Jamf Connect
AADSTS7000222 InvalidClientSecretExpiredKeysProvidedThe client secret keys have expiredSecret past its end dateNew secret, or a certificate. Guide
AADSTS700229 ForbiddenTokenTypeOnly app-only tokens can be federated identity credentials for a Microsoft Entra issuerA user-delegated token used as the assertionUse a token from the client credentials flow
AADSTS700005 InvalidGrantRedeemAgainstWrongTenantThe authorization code was meant for another tenantCode redeemed against a different tenantRedeem it at the authority used to get it
AADSTS1000000 UserNotBoundErrorThe Bind API needs the user to also authenticate with an external identity provider, which hasn't happened yetExternal sign-in step not completedComplete the external provider's sign-in
AADSTS1000002 BindCompleteInterruptErrorThe bind succeeded, but the user must be informedInformational interruptNo fix needed
AADSTS100007Microsoft Entra Regional only supports managed identities, or MSAL requests using subject name and issuer (SN+I) for first-party apps or apps in Microsoft infrastructure tenantsAnother kind of app sent to a regional endpointUse the standard sign-in endpoint
AADSTS1000031The application can't be accessed at this time; contact your administratorNot documented furtherThe enterprise app's status and the sign-in log details
AADSTS7000112 UnauthorizedClientApplicationDisabledThe application is disabledApp disabled for sign-inEnabled for users to sign in? in the enterprise app's Properties
AADSTS7000114The app isn't allowed to make application on-behalf-of callsAn on-behalf-of exchange started from an app-only tokenOBO needs a user's token; for app-only access use client credentials
AADSTS7500529The value isn't a valid SAML ID: an ID must not begin with a numberThe app generates IDs that start with a digitPrefix the ID, for example "id" followed by a GUID
AADSTS9002341V2Error invalid_grant: the user is required to permit single sign-onThe user hasn't granted the app the permissions SSO needsLet the user complete the consent screen
AADSTS901011 NoEmailAddressCollectedFromExternalOidcIDPNo email address came from the external OpenID Connect providerThe user chose "Hide my email" at sign-upThe user shares an email address; the provider's email claim
AADSTS901012 EmailAddressCollectedFromExternalOidcIDPNotVerifiedThe email address in the provider's ID token isn't verifiedUnverified address at the providerThe user verifies it with the provider
AADSTS901014 NoExternalIdentifierCollectedFromExternalOidcIDPThe external identifier is missing from the provider's ID tokenClaim not issued or not mappedThe provider's claims and the mapping in Entra
AADSTS650059The app isn't configured for use in this tenant: signInAudience AzureADMyOrg limits it to its home tenantA single-tenant app opened from another tenantMake it multitenant, or sign in through its home tenant

How to verify a fix#

  1. Password codes: repeat the change. Good: it succeeds, and synced users can sign in with the new password both in the cloud and on a domain-joined PC. For writeback problems, Microsoft's general steps are to reproduce one exact scenario (reset and change are different operations), compare a working and a failing user, use the same domain controller as Microsoft Entra Connect, and read the Application events in Event Viewer.
  2. Device and Windows Hello codes: after enabling or rejoining the device, run dsregcmd /status again, sign out and back in with the PIN, and confirm a success in the sign-in log for that device.
  3. App codes: request a token again and confirm a success on the Service principal sign-ins tab, or in the user tab for delegated flows.
  4. With sign-in logs in Log Analytics, confirm device failures stop:
    KQL
    SigninLogs
    | where TimeGenerated > ago(7d)
    | where ResultType in ("130004", "130007", "130008", "135011")
    | extend DeviceName = tostring(DeviceDetail.displayName)
    | summarize Failures = count() by ResultType, DeviceName

Related guides: Windows Hello for Business with cloud Kerberos trust and App registrations and service principals.

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)