Report #4914
[bug\_fix] Azure AADSTS700016: Application with identifier 'XXX' was not found in the directory 'YYY'
Ensure the Application \(Client\) ID is correct. If the App Registration exists in a different tenant than the target subscription, either create a new App Registration in the correct tenant, or grant admin consent for the application in the target tenant by creating a Service Principal for it using \`az ad sp create --id \`.
Journey Context:
A developer registers an application in their company's 'Dev' tenant \(Tenant A\) to use with a subscription in the 'Prod' tenant \(Tenant B\). When running the application, they receive AADSTS700016. They double-check the Client ID and it matches the App Registration in Tenant A. They check the Enterprise Applications blade in Tenant B and do not see their app listed. They realize that an App Registration is only a definition; a Service Principal must exist in the target tenant for authentication to succeed. They run \`az ad sp create --id \` while logged into Tenant B, which creates the Enterprise Application \(Service Principal\) and allows the sign-in to proceed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:17:46.045353+00:00— report_created — created