Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

AADSTS500011: the resource principal named in the message was not found in the tenant

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

A user or an application signs in and the request fails with AADSTS500011. The message names a resource, by URL, and a tenant, by ID, and says the resource was not found in that tenant. The resource is the application or service being asked for, not the application the user is signing in from. Microsoft's page gives four possible causes, and each can be checked without changing anything.

Nothing in this walk-through changes a tenant setting. The one change Microsoft's page points to, consent, is described with its risks and left to an administrator.

What the error means

Microsoft's page gives the message in this form:

AADSTS500011 - The resource principal named [resource URL] was not found in the tenant named [tenant ID]

A resource principal is the application or service being requested. The page says the error occurs when it is not found in the tenant. The list of Microsoft Entra authentication and authorization error codes carries the code with the name InvalidResourceServicePrincipalNotFound, and adds that it can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant, and that the authentication request might have been sent to the wrong tenant. The list also says that if you expect the app to be installed, you might need to provide administrator permissions to add it, and to check with the developers of the resource and application to understand what the right setup for your tenant is.

The wording separates this error from its neighbour. AADSTS700016 is about the client application, the one making the request, missing from the directory. AADSTS500011 is about the resource, the thing being called, missing from the tenant.

Likely causes

Cause on Microsoft's page What it looks like Where to check
The resource application is not provisioned by the administrator in the tenant The application is absent from Enterprise applications Microsoft Entra ID > Enterprise applications
The resource application is not consented to by any user in the tenant The application is absent or lacks consent Enterprise applications; the application's Permissions
The resource URL is not configured correctly The URL in the error differs from the application you provisioned The resource URL in the message against the application's identifier
The tenant ID is not correct The tenant ID in the message is not your tenant The tenant ID in the message against your own

Microsoft's page gives no counts, so the rows are not in order of likelihood.

Other codes that look alike

Three other codes in Microsoft's error list read similarly and point at a different object, so read the code before the sentence.

  • AADSTS700016 (UnauthorizedClient_DoesNotMatchRequest): the list says the application was not found in the directory or tenant, which can happen if it has not been installed by the administrator or consented to by any user, if the application identifier was misconfigured, or if the request went to the wrong tenant. The missing object is the client application.
  • AADSTS500014 (InvalidResourceServicePrincipalDisabled): the service principal for the resource is disabled. The list says this indicates that a subscription within the tenant has lapsed, or that an administrator has disabled the application's service principal. The resource exists here, but it is switched off.
  • AADSTS65001 (DelegationDoesNotExist): the user or administrator has not consented to use the application with the stated ID.

If the resource is in Enterprise applications but sign-in still fails, compare the code against this list. AADSTS500011 means the resource is not in the tenant at all.

Prove the cause before changing anything

All of these only read.

  1. Copy the whole message. Note the resource URL and the tenant ID exactly.
  2. Compare the tenant ID in the message with your own tenant ID. The page says to verify that the tenant ID that appears in the error message is the same as your tenant ID, and that the authentication request is sent to the correct Microsoft Entra ID tenant. A mismatch means the request went to the wrong tenant, and the application may be fine.
  3. In the Azure portal, go to Microsoft Entra ID > Enterprise applications. Check whether the application is listed and correctly configured.
  4. Compare the resource URL in the message with the application you provisioned. The page says the URL in the message must match the resource application provisioned in your tenant, and that the request must be sent with the correct resource URL.
  5. Find the application and check that it has the necessary permissions and consent. Microsoft says the application should have been consented to by an administrator or a user in the tenant.
  6. If the application belongs to a supplier, find out from the supplier what the correct URL and setup are. The error list says to check with the developers of the resource and application to understand what the right setup for your tenant is.

Example (illustrative): at contoso.com.au a finance team starts a reporting tool from a software supplier and gets AADSTS500011. The tenant ID in the message is the supplier's test tenant, not contoso's. The tool was configured with the wrong tenant ID, so the first cause to rule out is the wrong tenant, and nothing needs provisioning in the contoso tenant.

Fix

Work down the same list, because the first three checks decide which fix applies.

  • Wrong tenant ID. Microsoft's page says to make sure that the authentication request is sent to the correct Microsoft Entra ID tenant. Any change is made in the application or its settings by whoever manages it, who records the current value first. The page gives no steps beyond that.
  • Wrong resource URL. Microsoft's page says to make sure that the authentication request is sent by using the correct resource URL, one that matches the resource application provisioned in your tenant. Any change is made in the application's configuration by whoever manages it, who records the current value first. The page gives no steps beyond the match.
  • Not provisioned or not consented. An administrator needs to make sure the application is registered in the tenant and consented to. Microsoft's admin consent page describes the route in Enterprise applications: select the application, select Permissions under Security, review what the application requires, and select Grant admin consent. That page calls tenant-wide admin consent a sensitive operation that can give the application's publisher access to significant portions of your organisation's data, and says by default it allows all users to access the application unless otherwise restricted. To restrict which users can sign in, the page says to configure the app to require user assignment and then assign users or groups to the application. It also says granting consent may revoke permissions already granted tenant-wide for that application. The AADSTS500011 page gives no consent steps, and Microsoft's admin consent page states no way to take back a consent once granted, so no steps are given here. If an administrator decides to grant consent, the steps are on that page, and the decision belongs to whoever owns the tenant, after the supplier has confirmed what the application needs.

For applications built by your own developers, the same consent page also describes granting consent from App registrations, and the page notes the Enterprise applications route only works if the application is already provisioned in the tenant, which happens when at least one user consents to it.

Confirm the fix

  • The sign-in completes with no AADSTS500011.
  • The application now appears in Enterprise applications with the permissions its supplier says it needs.
  • The tenant ID and resource URL in any new error text, if one appears, match your tenant and the provisioned application.
  • A second user, in a different group, can sign in as well, which shows the fix is not tied to one account.

What to watch afterwards

  • New applications introduced by suppliers. Ask for the correct resource URL and the permissions needed before the first user signs in.
  • Copied configuration from a test or another customer's tenant, which is the shape of the wrong-tenant example above.
  • Consent given tenant-wide. Microsoft's page treats it as sensitive, so keep a record of who granted it and why.
  • Related errors on the same application, such as AADSTS700016 for a missing client application or AADSTS65001 for missing consent.

Risks and limits

These steps have not been run or lab-tested.

Microsoft's AADSTS500011 page gives no version range, no portal screenshots and no steps for correcting a wrong URL or tenant ID. The consent route comes from a separate Microsoft page and is described here, not instructed, because it can widen what an application can read across the tenant and that page gives no undo for it. The page's own wording, "Make sure that the resource application has been consented to", does not say whose consent counts when the application belongs to another organisation.

Sources