Home › Microsoft Entra ID › AADSTS90056

Microsoft Entra ID · AADSTS90056 · Microsoft Entra ID / Azure AD / Microsoft 365

AADSTS90056 ResourceRequiresAuth in Microsoft Entra ID

Missing required permission scopes or incorrect token audience leads to unauthorized access errors; add necessary permissions and verify token audience.

Error Details

FactValueSourceNote
Exact error stringAADSTS90056: The application or resource is attempting to access a resource that requires authentication.MSAL/ADAL logs-> JSON body
Affected build rangeMicrosoft Entra ID / Azure AD / Microsoft 365N/A
Registry key or OMA-URI involvedN/AN/A
Relevant service/endpoint URL/authorize, /tokenNetwork tab in browser developer tools-> failed response
Log line signature401 Unauthorized or insufficient_scopeApplication error logs

Log Files to Check

What This Error Actually Means

AADSTS90056 is a Microsoft Entra ID error that occurs when an application or service attempts to access a resource that requires authentication, but the token request does not include the necessary scope or the resource is not registered as accessible to the calling application in Entra ID. This error can be triggered by various issues such as missing API permissions, incorrect scopes specified during token requests, and mismatched audience claims between tokens and target resources. The component that raises this error is typically an authentication library like MSAL (Microsoft Authentication Library) or ADAL (Azure Active Directory Authentication Library). These libraries handle the OAuth 2.0 protocol for obtaining access tokens from Entra ID, which are then used to authenticate requests against protected APIs such as Microsoft Graph. When a token request fails due to insufficient permissions or incorrect configuration, these libraries return AADSTS90056.

Affected Versions and Scope

This error affects all versions of Microsoft Entra ID, Azure AD, and Microsoft 365 where applications are integrated with the OAuth 2.0 protocol for authentication purposes. It is not specific to any particular build range but rather a generic error that can occur across different environments where application-to-application communication relies on secure access tokens. The error does NOT affect standalone installations of Windows or Office products without integration into Entra ID or Azure AD services. Additionally, it does not impact scenarios where users authenticate directly through the browser for web applications without involving API permissions and token requests.

Where To Look First: Logs and Event IDs

To diagnose AADSTS90056, sysadmins should first examine MSAL/ADAL authentication library logs. These logs are typically found in %ProgramData%\Microsoft\IdentityPlatform\v1.0\Logs or similar paths depending on the application's configuration. Look for log entries containing the exact error string "AADSTS90056: The application or resource is attempting to access a resource that requires authentication." Additionally, Entra ID sign-in logs in the portal can provide valuable insights into failed authentication attempts. Navigate to entra.microsoft.com > Monitoring > Sign-in logs, and filter by error code 90056 to see detailed information about when and where this error occurred. Application error logs should also be reviewed for any '401 Unauthorized' or 'insufficient_scope' messages, which indicate that the application attempted to access a resource but was denied due to missing permissions. Browser developer tools can further help by showing failed /authorize or /token responses with AADSTS90056 in the JSON body.

Root Causes

Missing API Permissions in Entra ID App Registration

One common cause of AADSTS90056 is that the application's API permissions do not include the required scope for accessing a specific resource. For example, if an app needs to read user profiles via Microsoft Graph but lacks User.Read permission, it will receive this error.

Admin Consent Not Granted

Another frequent issue is that admin consent has not been granted for application permissions in Entra ID. Even if the necessary API permissions are present, they must be approved by an administrator before applications can use them.

Mismatched Audience Claims Between Tokens and Target Resources

This error may also occur when tokens issued for one API are used against another due to a mismatch in audience claims (aud claim). For instance, if the token was intended for Microsoft Graph but is mistakenly used with SharePoint Online, AADSTS90056 will be raised.

Fix Procedure

  1. Navigate to Entra admin center > App registrations > [App] and review API permissions. Add any missing permission scopes using the "Add a permission" button.
  2. Grant admin consent for application permissions by clicking 'Grant admin consent' next to each required scope.
  3. Verify that the access token's audience matches the target resource's application ID URI. Use jwt.ms or similar tools to inspect tokens and ensure the 'aud' claim is correct.
To automate these steps, you can use PowerShell cmdlets like: Get-MgServicePrincipal -Filter "appId eq '{AppID}'" This retrieves information about the service principal associated with your application. For more granular control over permissions and consent settings, consider using: Set-AzureADApplicationPermissionGrant -ObjectId "{AppID}" Finally, to check if admin consent has been granted for specific permissions, run: Get-AzureADServicePrincipal -Filter "appId eq '{AppID}'" | Select-Object -ExpandProperty 'RequiredResourceAccess' This cmdlet will display all required resource access configurations for the specified application.
Be cautious when modifying service principal permissions as incorrect changes can break enrolled devices or services.
Use Get-WinEvent -LogName 'Microsoft-Graph' -MaxEvents 10 to quickly review recent Graph API activity logs for troubleshooting clues.

Error Code Variants

Error CodeDescription
AADSTS90056The application or resource is attempting to access a resource that requires authentication.
AADSTS70001Invalid request - the request body contains an unknown parameter.
AADSTS70002Invalid client secret provided. The client secret is either incorrect or expired.
AADSTS90056 should be distinguished from AADSTS70001, which indicates an unknown parameter in the request body, and AADSTS70002, which suggests a problem with the client secret.

Verification

To verify that the fix worked, check MSAL/ADAL logs for successful authentication attempts without AADSTS90056 errors. Additionally, review Entra ID sign-in logs to ensure there are no more instances of error code 90056. Application error logs should also show '200 OK' responses instead of previous '401 Unauthorized' or 'insufficient_scope' messages. Use the following PowerShell cmdlet to confirm that admin consent has been granted for necessary permissions: Get-AzureADServicePrincipal -Filter "appId eq '{AppID}'" | Select-Object -ExpandProperty 'RequiredResourceAccess' This will display all required resource access configurations, confirming that admin consent is in place.

Prevention

To prevent recurrence of AADSTS90056, ensure that application registrations in Entra ID include comprehensive API permissions and that admin consent is granted for any necessary scopes. Regularly review and update these settings as applications evolve or new features are added. Implement a baseline change to automatically register required permissions during the initial setup process of new applications. This can be achieved through scripts or automation tools that interact with the Entra ID Graph API, ensuring consistency across all deployments. Enforcing strict governance over application registrations and permission grants will minimize the risk of encountering AADSTS90056 errors in production environments. By following these guidelines and best practices, sysadmins can effectively manage Microsoft Entra ID integrations and maintain a secure yet functional environment for their applications.

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.