Microsoft 365 sign-in (Entra ID)

AADSTS700016: application not found in the directory or tenant

AADSTS700016 means Microsoft Entra ID could not find the app in the tenant that received the sign-in. Check the client ID, the tenant in the request and consent.

By EpiFive Editorial TeamSources checked How we check our guides

What the error means

AADSTS700016 is the Microsoft Entra code UnauthorizedClient_DoesNotMatchRequest. The sign-in request named an application, and the tenant that received the request has no matching application. Microsoft's reference gives three ways this happens: the app was never installed by an administrator of that tenant or consented to by any user there, the identifier for the app was configured wrongly, or the request was sent to the wrong tenant.

Unlike password or MFA errors, this one is about the app, not the person signing in. It appears when a new line-of-business app is first tested, when a script or integration is pointed at a different tenant, and when a multitenant app is used by an organization that has not yet consented to it.

Common causes

  • The client ID (Application ID) in the app or script does not match the app registration, for example after copying the Object ID by mistake or after the registration was recreated.
  • The request goes to the wrong tenant, for example a test tenant ID left in production settings.
  • The app is registered as single tenant, but users from another organization try to sign in.
  • A multitenant app has not been installed or consented to in the customer's tenant yet.

How to fix it

1. Users: confirm the account and report the full error

Check that you are signing in with the work or school account of the organization that gave you the app, not a personal or other company account. Then send the app owner or help desk the full error text, the correlation ID and the time. The fix is almost always on the app or tenant side.

2. Developers: compare the client ID with the app registration

In the Microsoft Entra admin center, browse to Entra ID, App registrations, open the app and read the Application (client) ID on the Overview page. Microsoft notes this value is what your code uses to identify the app. It must match the client ID in the app's configuration, script or connection string exactly.

3. Developers: check the tenant in the request

Make sure the sign-in authority points at the tenant where the app is registered or installed. Microsoft's registration guide explains that a "Single tenant only" app is for users and guests in your own tenant, while "Multiple Entra ID tenants" is for apps that users in any Microsoft Entra tenant should be able to use. If users from other organizations must sign in, the supported account type has to allow it. As a general step, if you can capture a token the same app received successfully, the free JWT decoder shows its tid (tenant) and aud (audience) claims for comparison.

For a multitenant app, an administrator of the user's tenant has to complete the app's consent flow so the app exists in that tenant. Afterwards it appears under Entra ID, Enterprise apps. The multitenant Entra app design guide covers admin consent and tenant allowlists, and the Exchange Online app-only certificate guide covers this error in unattended PowerShell scripts.

5. Look up the latest Microsoft description

Microsoft says error text can change and points to its error lookup page for current details:

https://login.microsoftonline.com/error?code=700016

If nothing works

Collect the correlation ID, timestamp, client ID and tenant ID from the failed request and compare them side by side with the app registration. If the app is a Microsoft or third-party product rather than your own, contact that vendor's support with these values.

What we checked

The Microsoft Entra authentication and authorization error codes reference on Microsoft Learn was read on 2026-11-19. It defines AADSTS700016 and lists the three causes described above, and the same page documents the error lookup URL. The app registration quickstart on Microsoft Learn was read for the App registrations path, the Application (client) ID and the supported account types. The error was not reproduced for this page.

Last checked: 2026-11-19.

Official sources

Questions people ask

What does AADSTS700016 mean?

Microsoft lists it as UnauthorizedClient_DoesNotMatchRequest: the application was not found in the directory or tenant that handled the sign-in request.

What usually causes AADSTS700016?

Microsoft names three causes: the app has not been installed by a tenant admin or consented to by any user in that tenant, the app identifier in the request is misconfigured, or the request was sent to the wrong tenant.

Can an end user fix AADSTS700016?

Rarely. The user can confirm they are signing in with the right organization account, but the fix is normally made by the app owner or by an administrator of the tenant.

Not your code?

Search the error code library, or report a code we don't cover. Spotted something out of date on this page? Report a correction.