Report #3612
[bug\_fix] AADSTS700016: Application with identifier 'xxx' was not found in the directory 'yyy'
Verify the \`AZURE\_TENANT\_ID\` \(or \`tenant\_id\` in code\) matches the Directory \(tenant\) ID shown in Azure Portal > Azure Active Directory > App registrations > \[Your App\] > Overview. If the app is multi-tenant, ensure the request uses the \`/common\` or \`/organizations\` endpoint. If single-tenant, the tenant ID must be the specific GUID where the app is registered.
Journey Context:
Developer deploys a Python app using \`azure-identity\` with \`EnvironmentCredential\` to a new staging Kubernetes cluster. They set \`AZURE\_TENANT\_ID\`, \`AZURE\_CLIENT\_ID\`, and \`AZURE\_CLIENT\_SECRET\` as secrets, copying values from their dev environment but forgetting to change the Tenant ID. The pod crashes with AADSTS700016. They check the Client ID and Secret multiple times. They log into Azure Portal and realize the App Registration is in their Dev tenant \(tenant ID A\), but the staging environment variable points to the Prod tenant \(tenant ID B\) where the app doesn't exist. They update the \`AZURE\_TENANT\_ID\` to the correct GUID from the App Registration Overview page. The pod starts successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T17:38:18.290172+00:00— report_created — created