Home › Microsoft Purview › AADSTS50005

Microsoft Purview · AADSTS50005 · Windows 11 23H2

AADSTS50005: Purview login blocked due to Conditional Access policy - Windows 11 23H2

User attempted to log in from unsupported platform; verify CA policies and device compliance state.

Error Details

FactValueSourceNote
Exact error stringAADSTS50005: The user is not authorized to perform the requested activity.Azure AD Sign-in logs-> Conditional Access policy
Affected build rangeWindows 11 23H2OS version info
Registry key involvedHKLM\SOFTWARE\Microsoft\AzureADRegistry Editor-> Conditional Access policy settings
Relevant service/endpoint URLhttps://login.microsoftonline.com/<tenant_id>/oauth2/v2.0/tokenNetwork trace
Log line signatureAADSTS50005: The user is not authorized to perform the requested activity.Azure AD Sign-in logs-> Conditional Access policy failure

Log Files to Check

What This Error Actually Means

The error code AADSTS50005, "AADSTS50005: The user is not authorized to perform the requested activity," indicates that a user's attempt to log into Microsoft Purview has been blocked due to Conditional Access policies or device compliance issues. This error occurs when Azure AD detects an unauthorized login attempt from a platform that isn't supported by the organization’s Conditional Access policy, or if the device attempting access is not compliant with the required security standards set forth in your organization's policies. The component responsible for raising this error is the Microsoft Purview service itself, which relies on Azure Active Directory (Azure AD) to enforce conditional access and compliance rules. When a user tries to log into Purview from an unsupported platform or non-compliant device, Azure AD blocks the login attempt and returns this specific error code.

Affected Versions and Scope

This issue is prevalent in Windows 11 build 23H2, where Conditional Access policies are rigorously enforced. The affected builds include any version of Windows 11 that supports conditional access policies through Azure AD. This includes but isn't limited to the latest updates and patches applied to Windows 11. It's important to note that this error does not affect older versions of Windows or other operating systems unless they are explicitly included in your Conditional Access policy configurations. Additionally, users who have their devices enrolled under a different compliance state (e.g., fully compliant) will not encounter this issue when attempting to log into Purview from supported platforms.

Where To Look First: Logs and Event IDs

To diagnose the root cause of AADSTS50005, start by examining the following logs: - C:\Windows\System32\winevt\Logs\Security.evtx: This log file contains security-related events that can provide clues about why a user's login attempt was blocked. Look for Event ID 4769 (User account control policy change) and Event ID 4771 (Group membership changes). - C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\MME.log: This log file is crucial as it captures detailed information about device compliance status and Conditional Access enforcement. Search for entries related to AADSTS50005 error strings. You can also use the Azure AD Sign-in logs in the Entra admin center to review failed sign-ins and identify patterns or specific reasons why a user's login attempt was denied. The exact log line you should be looking for is: AADSTS50005: The user is not authorized to perform the requested activity.

Root Causes

Conditional Access Policy Mismatch

One of the primary causes of AADSTS50005 is a mismatch between the Conditional Access policies configured in Azure AD and the device or platform from which the user is attempting to log into Purview. To distinguish this cause, check if the user's login attempt was made from an unsupported platform according to your organization’s policy settings.

Device Compliance Issues

Another common reason for encountering AADSTS50005 is that the device used by the user is not compliant with the required security standards. You can verify this by running dsregcmd /status, which provides detailed information about Azure AD registration status, including compliance state.

User Account Configuration Errors

Sometimes, AADSTS50005 may be triggered due to incorrect user account configurations in Azure AD. This could include issues such as missing or outdated attributes that are required for Conditional Access policies to function correctly.

Fix Procedure

To resolve the issue of AADSTS50005, follow these steps: 1. **Review and Update Conditional Access Policies**: Navigate to the Intune admin center > Azure AD > Conditional Access > Policies. Ensure that your policy configurations allow users to log into Purview from supported platforms. 2. **Check Device Compliance State**: - Run dsregcmd /status on the affected device to verify its compliance status. - If necessary, update the device's configuration using Intune management policies or scripts. 3. **Adjust Registry Settings for Azure AD Integration**: Modify the registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AzureAD. Ensure that all required settings are correctly configured according to your organization’s standards. 4. **Review and Update User Account Attributes**: - Use PowerShell cmdlets like Get-MgUser -UserId $userPrincipalName | Select-Object -ExpandProperty mailNickname, userPrincipalName to check user account attributes. - If necessary, update the attributes using Set-MgUser -UserId $userPrincipalName -MailNickName "newnickname" -UserPrincipalName "[email protected]". 5. **Re-enroll Devices if Necessary**: In cases where device re-enrollment is required, use Intune admin center > Devices > Enrollment to manage and enforce compliance.
Warning: Re-enrolling devices can disrupt user productivity temporarily until the process completes.

Error Code Variants

CodeDescription
AADSTS50107User is not a member of any group that has access to the resource.
AADSTS65001The user or administrator has not consented to use this application.
AADSTS50079Access is denied due to policy restrictions.

Verification

To verify that the issue has been resolved, look for successful login attempts in Azure AD Sign-in logs. The log line should no longer contain AADSTS50005: The user is not authorized to perform the requested activity.. Additionally, check the compliance status of affected devices using dsregcmd /status, ensuring that all necessary configurations are in place.

Prevention

To prevent recurrence of AADSTS50005 errors, ensure that your Conditional Access policies and device compliance settings are regularly reviewed and updated. Additionally, implement a baseline configuration using OMA-URI strings such as ./Device/Vendor/MSFT/ComplianceSettings to enforce consistent security standards across all devices.
Tip: Use the Azure AD Sign-in logs in the Entra admin center for real-time monitoring of login attempts and policy enforcement.
By following these guidelines, you can effectively troubleshoot and resolve issues related to AADSTS50005 errors when using Microsoft Purview on Windows 11 build 23H2.

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.