Entra ID sign-in error

AADSTS500011: Resource (API) not found in the tenant

AADSTS500011 means the API the app wants a token for has no service principal in the tenant. Check the resource URI, the tenant and whether the API is added.

Last updated Checked against Microsoft Learn on Look up another code

AADSTS500011

App registrations and credentialsWho fixes it:App developerTenant admin

The resource principal named {name} wasn't found in the tenant named {tenant}.

Microsoft's description (InvalidResourceServicePrincipalNotFound), from the Microsoft Entra error code reference

What it means

The API the app asked a token for has no service principal in the tenant. Either the resource was never added to the tenant or consented to, or the resource URI in the request is wrong. The request may also have gone to the wrong tenant, or the API may be a single-tenant app registered in another tenant.

Fix it: tenant admins

  1. Look for the API under Enterprise apps with the application type filter set to all applications. If it is not there, it has not been added to your tenant.
  2. Check it has the permissions and consent the calling app needs, and grant admin consent if it does not (see AADSTS65001).

Fix it: app developers

  1. Check the resource or scope URI in the request against the API's application ID URI, character by character.
  2. Check the tenant ID in the error message is the tenant you meant to sign in to.
  3. If the API is registered in another tenant, its app registration must be multitenant, or the request must go to the tenant where it is registered.

Related codes

Microsoft sources

Find who is hitting AADSTS500011

Sign-in logs record the code without the AADSTS prefix: as status/errorCode in Microsoft Graph S04 and as ResultType in the SigninLogs table in Log Analytics S05. The SigninLogs and Microsoft Graph queries below cover interactive sign-ins. Non-interactive sign-ins are in the AADNonInteractiveUserSignInLogs table, which documents the error code in ResultSignature S41. If you query that table, test ResultType as well. For one failed sign-in, paste its error message into the lookup to get queries for its Correlation ID.

This code can also come from an app signing in as itself (client credentials), not from a person. Those sign-ins are in the AADServicePrincipalSignInLogs table, which documents the error code in ResultSignature S74; the query checks ResultSignature and ResultType.

Apps signing in as themselves (KQL), last 7 days

AADServicePrincipalSignInLogs
| where TimeGenerated > ago(7d) and (ResultType == "500011" or ResultSignature == "500011")
| summarize Failures = count(), Last = max(TimeGenerated) by ServicePrincipalName, AppId
| sort by Failures desc

Log Analytics (KQL), last 7 days

SigninLogs
| where TimeGenerated > ago(7d) and ResultType == "500011"
| summarize Failures = count(), Last = max(TimeGenerated) by UserPrincipalName, AppDisplayName
| sort by Failures desc

Microsoft Graph PowerShell, last 7 days

Connect-MgGraph -Scopes "AuditLog.Read.All"
$since = (Get-Date).ToUniversalTime().AddDays(-7).ToString("yyyy-MM-ddTHH:mm:ssZ")
Get-MgAuditLogSignIn -Filter "status/errorCode eq 500011 and createdDateTime ge $since" -All |
  Select-Object CreatedDateTime, UserPrincipalName, AppDisplayName, CorrelationId

Reading sign-in logs needs at least the Reports Reader role S06; the Graph call needs the AuditLog.Read.All permission S42, and -All returns every page of results S69.

Sources for this page

Microsoft's description is quoted from the Microsoft Entra error code reference; it is Microsoft's text and is not covered by our CC BY 4.0 licence. The cause and fix steps are our own wording, published under CC BY 4.0; each source below is the Microsoft page they rest on, with the passage we checked. Rules for every page are in the methodology.

  1. S30. Microsoft (Microsoft Learn), Error AADSTS500011: The resource principal was not found in the tenant. Retrieved 2026-11-25.

    The resource application isn't provisioned by the administrator in the tenant.

    The resource URL is not configured correctly.

    Verify that the tenant ID that appears in the error message is the same as your tenant ID.

  2. S19. Microsoft (Microsoft Learn), Troubleshoot consent issues in Microsoft Entra ID. Retrieved 2026-11-25.

    If the <App-URI-ID> is owned by a different <Tenant-ID>, then the app registration for <App-URI-ID> must be set up as a multi-tenant application.

  3. S01. Microsoft (Microsoft Learn), Microsoft Entra authentication and authorization error codes. Retrieved 2026-11-25.

    Check with the developers of the resource and application to understand what the right setup for your tenant is.

    Error codes are subject to change at any time in order to provide more granular error messages

    Error codes and messages are subject to change. For the most current info, take a look at the

    You can also link directly to a specific error by adding the error code number to the URL

  4. S74. Microsoft (Microsoft Learn, Azure Monitor), Azure Monitor Logs reference: AADServicePrincipalSignInLogs. Retrieved 2026-11-25.

    Contains the error code, if any, for the sign-in operation

  5. S04. Microsoft (Microsoft Learn, Microsoft Graph), signIn resource type. Retrieved 2026-11-25.

    Supports $filter (eq) on errorCode property.

    The request ID sent from the client when the sign-in is initiated. Used to troubleshoot sign-in activity.

  6. S05. Microsoft (Microsoft Learn, Azure Monitor), Azure Monitor Logs reference - SigninLogs. Retrieved 2026-11-25.

    Provides the 5-6 digit error code that's generated during a sign-in event. 0 indicates success; other values are failures.

    The identifier that's sent from the client when sign-in is initiated.

  7. S06. Microsoft (Microsoft Learn), How to troubleshoot sign-in errors. Retrieved 2026-11-25.

    Reports Reader is the least privileged role required to access the activity logs.

    any user can access their own sign-ins from https://mysignins.microsoft.com.

  8. S41. Microsoft (Microsoft Learn, Azure Monitor), Azure Monitor Logs reference - AADNonInteractiveUserSignInLogs. Retrieved 2026-11-25.

    Contains the error code, if any, for the sign-in operation.

  9. S42. Microsoft (Microsoft Learn, Microsoft Graph), List signIns. Retrieved 2026-11-25.

    To avoid having the request time out, apply the $filter parameter with a time range for which to get all sign-ins

    Sign-ins that are interactive in nature

  10. S69. Microsoft (Microsoft Learn, Microsoft Graph PowerShell), Get-MgAuditLogSignIn (Microsoft.Graph.Reports). Retrieved 2026-11-25.

    -All List all pages.

Back to the AADSTS Error Code Lookup · All 351 codes