Entra ID sign-in error

AADSTS700016: Application not found in the directory

AADSTS700016 means the app's client ID was not found in the tenant the request went to. Check the client ID, the tenant and multitenant settings.

Last updated Checked against Microsoft Learn on Look up another code

AADSTS700016

App registrations and credentialsWho fixes it:App developerTenant admin

The application wasn't found in the directory/tenant.

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

What it means

The application (client) ID in the request was not found in the tenant the request was sent to. Usually the client ID is wrong, or the app is registered in a different tenant from the one in the sign-in URL. Microsoft's list adds the case of an app that no admin has installed in the tenant and no user has consented to.

Fix it: tenant admins

  1. For a multitenant app from another organisation that you have checked and trust, an admin in your tenant can grant tenant-wide consent to it. See AADSTS65001 for the checks to make first. Consent creates the app's service principal in your tenant.
  2. If you do not recognise the app, do not consent to it.

Fix it: app developers

  1. Check the client ID and tenant ID in the app's configuration against its app registration.
  2. If the app signs in through the /common or /organizations endpoint, its registration must accept accounts in any organisational directory: Authentication > Supported account types.
  3. Make sure the tenant in the sign-in URL is the tenant where the app is registered, or one where it has been added.

Fix it: the person signing in

  1. Send the app's support team or your IT team the Request ID, Correlation ID and timestamp from the error screen. The fix is in the app's settings, not in your account.

Related codes

Microsoft sources

Find who is hitting AADSTS700016

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.

Log Analytics (KQL), last 7 days

SigninLogs
| where TimeGenerated > ago(7d) and ResultType == "700016"
| 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 700016 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. S01. Microsoft (Microsoft Learn), Microsoft Entra authentication and authorization error codes. Retrieved 2026-11-25.

    You might have misconfigured the identifier value for the application or sent your authentication request to the wrong tenant.

    This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant.

    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

  2. S17. Microsoft (Microsoft Learn), Troubleshoot confidential client applications (MSAL.NET). Retrieved 2026-11-25.

    The app registration exists in a different tenant than the authority being used.

    Double-check the ClientId and TenantId in your configuration.

    If using /common or /organizations authority, ensure the app supports multi-tenant access.

  3. S18. Microsoft (Microsoft Learn), Convert a single-tenant app to multitenant on Microsoft Entra ID. Retrieved 2026-11-25.

    select the Authentication pane and navigate to the Supported account types section. Change the setting to Accounts in any organizational directory.

    After the admin consents and the service principal is created in the customer's tenant, subsequent sign-in requests don't need the prompt=consent parameter.

  4. S20. Microsoft (Microsoft Learn), Grant tenant-wide admin consent to an application. Retrieved 2026-11-25.

    Granting admin consent on behalf of an organization is a sensitive 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