Report #36404
[bug\_fix] AADSTS700016: Application with identifier 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' was not found in the directory 'tenant-id'. 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
Update the authority or tenant ID in your application configuration to match the Azure AD tenant where the App Registration was created. If the app is single-tenant, ensure the authority URL uses the specific tenant ID \(e.g., https://login.microsoftonline.com/12345678-...\) rather than 'common', 'organizations', or an incorrect tenant GUID. Root cause: The authentication endpoint is attempting to look up the client\_id in a tenant directory that does not contain the application registration, resulting in a lookup failure before any credential validation occurs.
Journey Context:
You clone a sample repository for a Node.js web application using the Microsoft Authentication Library \(MSAL\). You register an application in your company's Azure AD tenant \(Tenant A\) and copy the Client ID and Tenant ID into the application configuration. When you run the app locally and click 'Sign In', you receive the error 'AADSTS700016: Application with identifier \[client-id\] was not found in the directory \[different-tenant-id\].' You inspect the error URL and notice the 'tenant' parameter in the authorize endpoint is set to 'common' or a tenant ID that does not match your company's tenant. You search the codebase and find the msalConfig object hardcodes authority: 'https://login.microsoftonline.com/common' or uses an environment variable TENANT\_ID that defaulted to 'common' in the sample. You change the authority to 'https://login.microsoftonline.com/your-actual-tenant-id', restart the application, and the authentication proceeds because Azure AD can now resolve the App Registration in the correct tenant directory.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:35:10.188071+00:00— report_created — created