Error Details
| Fact | Value | Source | Note |
|---|---|---|---|
| Exact error string | AADSTS65001: User or admin consent required. | AAD authentication response | OAuth 2.0 flow |
| Affected OS build | Windows 11 22H2 (22621.x) | Windows Update history | All versions |
| Registry key | HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AzureAD\Consent | Windows Registry | Consent policy override |
| Service endpoint | https://login.microsoftonline.com | Entra ID API | OAuth 2.0 token endpoint |
| Log line signature | ConsentRequiredException: Missing required permissions | AzureAD-logs.evtx | Event ID 40960 |
Log Files to Check
C:\ProgramData\Microsoft\AzureAD\Logs\AzureAD-logs.evtxC:\Windows\System32\winevt\Logs\Microsoft-Windows-AzureAD%4Operational.evtx
What This Error Actually Means
TheAADSTS65001 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 inWindows 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 enforcesUser 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 inHKEY_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'sConsent Grants section in the Entra portal.
Fix Procedure
- Verify registry settings:
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\AzureAD\Consent" | Select-Object ConsentRequiredIfConsentRequiredis set to1, reset it:Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\AzureAD\Consent" -Name ConsentRequired -Value 0 - Grant admin consent via PowerShell:
Connect-MgGraph -Scopes "Application.ReadWrite.All" Grant-MgPermissionGrant -ClientId "APP_CLIENT_ID" -ConsentType "AllPrincipals" -Scope "User.Read" -AdminConsent - Deploy a device configuration profile in Intune:
- Navigate to
Intune admin center > Devices > Configuration profiles > Create profile. - SelectOMA-URIwith the setting:./Device/Vendor/MSFT/EntraID/Consent/Required 0 - Review and update app permissions:
Get-MgApplication -Filter "appId eq 'APP_ID'" | Select-Object RequiredResourceAccessEnsure all required permissions are pre-approved inEntra 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 Code | Description | Distinguishing Factor |
|---|---|---|
AADSTS65001 | Consent required | Missing admin/user consent for permissions |
AADSTS50011 | Invalid resource | Invalid audience in token request |
AADSTS50034 | Invalid client | Invalid client ID or certificate |
Verification
After applying fixes, verify resolution by: 1. Checkingdsregcmd /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.