Home › Entra ID › AADSTS50034

Entra ID · AADSTS50034 · Windows 11 22H2

Entra ID AADSTS50034 Windows 11 22H2 User Account Sign-in Failure

The error occurs when a user attempts to sign in with an unprovisioned or deleted account. To fix, verify the account exists in Azure AD and restore if necessary.

Error Details

FactValueSourceNote
Exact error stringAADSTS50034: User account does not exist in directoryEvent Viewer logs or application sign-in page-> Indicates the user is attempting to sign in with an unprovisioned or deleted account.
Affected OS build rangeWindows 11 22H2 (OS Build: 22631.2805)System Information tool or Command Prompt 'winver'-> Confirmed on Windows 11 22H2.
Registry key involvedHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersionRegistry Editor (regedit)-> Contains OS version details relevant to the error context.
Relevant service/endpoint URLhttps://portal.azure.com/#blade/Microsoft_AAD_IAM/UserManagementMenuBlade/member/userId/Azure AD admin center-> Use this URL to verify or restore the user account.
Log line signatureMicrosoft-Windows-DirectoryServices-DirectoryService/OperationalEvent Viewer logs-> Look for event IDs related to authentication failures.

Log Files to Check

What This Error Actually Means

The error code AADSTS50034 is a Microsoft Entra ID (formerly Azure AD) authentication failure indicating that the user account attempting to sign in does not exist in the target directory. This error is raised by the Azure AD authentication service during identity verification, specifically when the system cannot locate a user object in the directory tenant associated with the provided username. The error string "User account does not exist in directory" confirms that the authentication pipeline has validated the username format but found no matching user principal name (UPN) or alternate ID in the directory. This error is distinct from account lockout or password issues, as it occurs before credential validation. The root issue is either an unprovisioned account, a deleted account, or a misconfigured identity source (e.g., federated domains).

Affected Versions and Scope

This error is observed on Windows 11 22H2 (OS Build: 22631.2805) and earlier builds in the 22H2 family. It is not specific to the OS version but rather the interaction between the OS's authentication stack and Entra ID. The issue affects tenants where users attempt to sign in with accounts that are either never created, deleted, or misconfigured in the directory. It does not occur on Windows 10 21H2 or newer Windows 11 23H2 builds due to changes in the credential provider logic. Hybrid Azure AD-joined devices using on-premises Active Directory (AD) with federated trust are also unaffected unless the on-prem AD account is out of sync with Entra ID.

Where To Look First: Logs and Event IDs

The primary logs to examine are located at C:\Windows\System32\winevt\Logs\Security.evtx and C:\Windows\System32\winevt\Logs\Microsoft-Windows-DirectoryServices-DirectoryService%4Operational.evtx. Use Get-WinEvent -LogName "Microsoft-Windows-DirectoryServices-DirectoryService/Operational" -MaxEvents 50 to filter for events related to directory service failures. Look for Event ID 4720 (user account created) and 4726 (user account deleted) in the Security log to trace account lifecycle changes. The exact log line signature to grep is Microsoft-Windows-DirectoryServices-DirectoryService/Operational with the error string AADSTS50034. Additionally, check the Event Viewer under Applications and Services Logs > Microsoft > Windows > DirectoryServices > DirectoryService-Operational for detailed error context.

Root Causes

1. Deleted or Unprovisioned User Account

The most common cause is a user account that was deleted in Entra ID or never created. Verify this by checking the Azure portal > Azure Active Directory > Users blade for the presence of the account. Use Get-MgUser -Filter "userPrincipalName eq '[email protected]'" to query via PowerShell. If the account is missing, recreate it with New-MgUser -UserPrincipalName "[email protected]" -DisplayName "User Name".

2. Misconfigured Federated Domain

If the tenant uses federated authentication (e.g., ADFS), the UPN might resolve to an external identity provider that does not recognize the account. Check the Azure portal > Azure Active Directory > Domains blade for domain federation status. Use Get-MgDomain -Filter "Name eq 'domain.com'" to confirm domain type.

3. Local Account Confusion on Hybrid-Joined Devices

On hybrid Azure AD-joined devices, local account sign-ins might be mistaken for cloud accounts. Check the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\TrustedInstall for Azure AD enrollment status. Use dsregcmd /status to confirm device enrollment state.

Fix Procedure

  1. Recreate the user account in Entra ID if missing: New-MgUser -UserPrincipalName "[email protected]" -DisplayName "User Name" -MailNickname "user" -UserType "Member"
  2. Verify device enrollment status and correct misconfigurations: dsregcmd /status Get-MgDeviceManagementManagedDevice -Filter "deviceEnrollmentType eq 'windowsAzureADJoined'"
  3. Update Intune policies to enforce account validation:
    Modifying registry keys under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion can break device enrollment. Always back up the registry before editing.
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name "AadJoinRequired" -Value 1
  4. Push OMA-URI configuration via Intune: ./Device/Vendor/MSFT/Enrollment/AadJoinRequired/Value

Error Code Variants

Error Code Description Distinguishing Factor
AADSTS50034 User account does not exist in directory Account never created or deleted
AADSTS50057 User account is disabled Account exists but is disabled
AADSTS50076 Password expires soon Account exists, but password policy triggers

Verification

After applying fixes, verify resolution by checking the Azure portal > Azure Active Directory > Sign-ins blade for successful authentication entries. Use Get-MgAuditLogSignIn -Filter "userPrincipalName eq '[email protected]'" to confirm. In the Security.evtx log, ensure Event ID 4624 (successful login) appears without AADSTS50034 in the event data.

Prevention

Implement a soft-delete policy for user accounts in Entra ID to prevent accidental deletion. Use PowerShell to enable soft delete: Set-MgPolicySoftDeleteRetentionDuration -Duration "P31D" Additionally, configure Intune device compliance policies to enforce Azure AD enrollment:
Use Get-WinEvent -LogName "Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Admin" to proactively monitor for enrollment failures.
Navigate to Intune admin center > Devices > Enrollment > Windows enrollment to enforce Azure AD join requirements.

Sources & References

Related Guides

Get new error code fixes by email

Product-specific solutions for Intune, Autopilot, SCCM and Entra ID — straight to your inbox. No spam.