Home › Entra ID › AADSTS50178

Entra ID · AADSTS50178 · Windows 11 23H2

Entra ID AADSTS50178 Conditional Access Failure Windows 11 23H2

Conditional access policy requires a compliant device or strong MFA claim; ensure compliance or use strong authentication methods.

Error Details

FactValueSourceNote
Exact error stringAADSTS50178: The user's sign-in was blocked in accordance with the conditions configured by the tenant administrator.Event Viewer - Windows Logs - Application-> Event ID
Affected build rangeWindows 11 23H2System Information
Registry key involvedHKLM\SOFTWARE\Microsoft\EntraID\PolicyComplianceRegistry Editor-> Check Compliance Status
Relevant service/endpoint URLhttps://login.microsoftonline.com/{tenant}/oauth2/v2.0/tokenFiddler or similar network tool
Log line signatureAADSTS50178: The user's sign-in was blocked in accordance with the conditions configured by the tenant administrator.Event Viewer - Windows Logs - Security-> Event ID 4625

Log Files to Check

What This Error Actually Means

The error code AADSTS50178 is raised by Microsoft Entra ID, specifically within its Conditional Access policies enforcement mechanism. It indicates that a user's sign-in attempt was blocked because the device used for authentication does not meet the compliance requirements set forth by the tenant administrator. This could be due to various reasons such as the device lacking necessary security features or failing to present a strong multi-factor authentication (MFA) claim.

Affected Versions and Scope

This error is observed in Windows 11 build 23H2, where Conditional Access policies are rigorously enforced. The issue does not affect older builds of Windows 10 that do not support the latest Conditional Access requirements or newer versions of Windows 11 if the tenant administrator has relaxed compliance standards for these devices.

Where To Look First: Logs and Event IDs

To diagnose this error, start by examining two specific log files located at: C:\Windows\System32\winevt\Logs\Application.evtx and C:\Windows\System32\wineevt\Logs\Security.evtx. The relevant event ID to look for is 4768 (Audit Failure) in the Security log, which corresponds directly to AADSTS50178. The exact log line you should be searching for includes: AADSTS50178: The user's sign-in was blocked in accordance with the conditions configured by the tenant administrator. Additionally, inspecting the registry key HKLM\SOFTWARE\Microsoft\EntraID\PolicyCompliance can provide insights into whether the device is compliant according to Entra ID policies.

Root Causes

Lack of Device Compliance

This occurs when a user attempts to sign in from a device that does not meet the compliance requirements set by Conditional Access policies. To distinguish this cause, check if the device has been flagged as non-compliant due to missing security features or outdated software.

Insufficient Multi-Factor Authentication (MFA) Claims

Another common reason is when a user's sign-in attempt fails because they are required to present additional MFA claims but do not have them available. This can be identified by reviewing the Conditional Access policies and ensuring that all necessary MFA methods are enabled for the user.

Fix Procedure

To resolve this issue, follow these steps: 1. **Check Device Compliance Status**: Use PowerShell to query the compliance status of the device: Get-MgDeviceManagementManagedDevice -Filter "deviceEnrollmentType eq 'windowsAutoEnrollment'" 2. **Update Device Policies and Settings**: Ensure that all necessary security policies are enabled on the device. This can be done via Intune or MEM, navigating to:
Intune admin center > Devices > Configuration Profiles
Here, you should apply a configuration profile that includes required settings such as BitLocker encryption and Windows Hello for Business. 3. **Enable Strong MFA Claims**: Configure strong MFA methods in the Entra ID portal under Conditional Access policies to ensure users are prompted for additional authentication factors. 4. **Verify Compliance After Changes**: Re-run the compliance check using PowerShell: Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/deviceManagement/managedDevices" 5. **Check Registry Key Settings**: Ensure that the registry key at HKLM\SOFTWARE\Microsoft\EntraID\PolicyCompliance reflects updated compliance settings.

Error Code Variants

Error Code Description Distinguishing Features
AADSTS50178 User sign-in blocked due to non-compliance. Specific mention of compliance issues in the error message.
AADSTS50196 User sign-in blocked due to missing required features. Error mentions specific missing features rather than general non-compliance.
AADSTS50173 User sign-in blocked due to insufficient MFA claims. Focuses on the lack of strong authentication methods.

Verification

To verify that the fix has been applied successfully, look for a log entry in Application.evtx indicating successful compliance: AADSTS50178: The user's sign-in was blocked in accordance with the conditions configured by the tenant administrator. should no longer appear. Additionally, check the Entra ID portal under Conditional Access to confirm that all policies are correctly set and enforced.

Prevention

To prevent recurrence of this issue, ensure that all devices meet or exceed the minimum compliance requirements specified in your organization's security policy. Regularly review and update these policies as new threats emerge and technology evolves. Implementing a robust device management solution like Microsoft Intune can help automate many aspects of maintaining compliance across a large fleet of endpoints.
A quick diagnostic shortcut is to use dsregcmd /status in PowerShell to check the current state of Azure AD registration and Conditional Access policies enforcement on the device.
This comprehensive guide should help sysadmins effectively troubleshoot and resolve AADSTS50178 errors, ensuring a secure sign-in experience for all users.

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.