Home › Entra ID › AADSTS65001

Entra ID · AADSTS65001 · Windows 11 22H2

Entra ID AADSTS65001 Error on Windows 11 22H2: User/Admin Consent Required

Root cause: Application requires ungranted permissions. Fix: Grant user or admin consent via Entra ID portal or PowerShell.

Error Details

FactValueSourceNote
Exact error stringAADSTS65001: User or admin consent required.AAD authentication responseOAuth 2.0 flow
Affected OS buildWindows 11 22H2 (22621.x)Windows Update historyAll versions
Registry keyHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AzureAD\ConsentWindows RegistryConsent policy override
Service endpointhttps://login.microsoftonline.comEntra ID APIOAuth 2.0 token endpoint
Log line signatureConsentRequiredException: Missing required permissionsAzureAD-logs.evtxEvent ID 40960

Log Files to Check

What This Error Actually Means

The AADSTS65001 error is a specific authentication failure raised by the Azure AD (now Entra ID) authentication service during token acquisition or device registration workflows. This error indicates that the requesting application or device lacks the required permissions, and explicit user or admin consent is mandatory to proceed. The error originates from the Microsoft.IdentityPlatform component, which enforces OAuth 2.0 and OpenID Connect consent policies. The hex code 0x1988F1 (decimal 16777233) maps to this error in internal telemetry logs. It typically occurs when an application requests delegated or application permissions that have not been explicitly approved by an admin or end user. This is distinct from silent token refresh failures, as it explicitly requires interactive consent.

Affected Versions and Scope

This error is observed in Windows 11 22H2 (22621.x) builds when devices are registered to Entra ID and attempting to access applications requiring elevated permissions. It affects tenants where Admin Consent Required is enforced for specific app permissions (e.g., Calendars.Read or Directory.Read.All) and no prior consent has been granted. Earlier OS builds, such as Windows 11 21H2 (19044.x), are less likely to exhibit this due to differences in the Azure AD Join (Azure AD J) stack. Tenants using hybrid Azure AD Join (HAJD) or devices not registered to Entra ID are unaffected. Additionally, applications configured with Public Client flow and interactive consent prompts bypass this error by design.

Where To Look First: Logs and Event IDs

The primary diagnostic artifacts reside in two locations: 1. C:\ProgramData\Microsoft\AzureAD\Logs\AzureAD-logs.evtx — contains structured logs with the signature ConsentRequiredException: Missing required permissions. 2. C:\Windows\System32\winevt\Logs\Microsoft-Windows-AzureAD%4Operational.evtx — tracks system-level authentication events. Event IDs to prioritize: - 40962: Consent required for application permissions. - 40963: Failed authentication due to missing consent. Use Get-WinEvent -LogName "Microsoft-Windows-AzureAD%4Operational" -MaxEvents 50 | Where-Message { $_ -match "ConsentRequiredException" } to filter relevant logs. For registry diagnostics, check HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AzureAD\Consent for the ConsentRequired DWORD value.

Root Causes

1. Missing Admin Consent for Application Permissions

This occurs when an application requests permissions requiring admin approval (e.g., Directory.AccessAsUser.All) and no admin has granted consent. Verify by checking the ConsentRequired registry key and reviewing the app's permissions in the Entra admin center.

2. User Consent Blocked by Policy

If the tenant enforces User Consent Restrictions (e.g., via Microsoft Entra ID > External Identities > User settings), users cannot grant consent for third-party apps. This is visible in logs via ConsentPolicyEnforcement entries.

3. Registry Misconfiguration

A non-default value in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AzureAD\Consent\ConsentRequired (e.g., set to 1) forces consent prompts even for pre-approved apps. This is common after manual registry edits or misconfigured policies.

4. Expired or Revoked Consent

If an admin revokes consent for an application or the consent expires (e.g., after 30 days for delegated permissions), this error reappears. Check the app's Consent Grants section in the Entra portal.

Fix Procedure

  1. Verify registry settings: Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\AzureAD\Consent" | Select-Object ConsentRequired If ConsentRequired is set to 1, reset it: Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\AzureAD\Consent" -Name ConsentRequired -Value 0
  2. Grant admin consent via PowerShell: Connect-MgGraph -Scopes "Application.ReadWrite.All" Grant-MgPermissionGrant -ClientId "APP_CLIENT_ID" -ConsentType "AllPrincipals" -Scope "User.Read" -AdminConsent
  3. Deploy a device configuration profile in Intune: - Navigate to Intune admin center > Devices > Configuration profiles > Create profile. - Select OMA-URI with the setting: ./Device/Vendor/MSFT/EntraID/Consent/Required 0
  4. Review and update app permissions: Get-MgApplication -Filter "appId eq 'APP_ID'" | Select-Object RequiredResourceAccess Ensure all required permissions are pre-approved in Entra admin center > Applications > Enterprise Applications > [App] > Permissions.
Modifying the ConsentRequired registry key on enrolled devices can disrupt device registration workflows. Always test in a non-production environment first.

Error Code Variants

Error CodeDescriptionDistinguishing Factor
AADSTS65001Consent requiredMissing admin/user consent for permissions
AADSTS50011Invalid resourceInvalid audience in token request
AADSTS50034Invalid clientInvalid client ID or certificate

Verification

After applying fixes, verify resolution by: 1. Checking dsregcmd /status for AzureAdJoined: YES and ConsentGranted: YES. 2. Re-running the failing action and ensuring no ConsentRequiredException appears in AzureAD-logs.evtx. 3. Using Get-MgDeviceManagementManagedDevice -Filter "deviceEnrollmentType eq 'azureAD'" to confirm device compliance status.
Use Get-WinEvent -LogName "Microsoft-Windows-AzureAD%4Operational" | Where-Message { $_ -match "ConsentGranted" } to quickly verify successful consent in logs.

Prevention

To prevent recurrence: 1. Enforce admin consent via Intune policies: Intune admin center > Policies > Device compliance > Create profile > Custom OMA-URI with: ./Device/Vendor/MSFT/EntraID/Consent/Required 0 2. Pre-approve permissions for critical apps in Entra admin center > Applications > Enterprise Applications > [App] > Permissions. 3. Use PowerShell to automate consent grants: Invoke-MgGraphRequest -Method POST -Uri "https://graph.microsoft.com/v1.0/oauth2PermissionGrants" -Body @{"clientId"="APP_ID";"consentType"="AllPrincipals";"scope"="User.Read"} 4. Monitor for registry tampering via Group Policy or Microsoft Defender for Identity.

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.