Interview Prep/Azure/Identity and Authorization Errors

`Error: AADSTS700016: Application with identifier '4444...' was not found in the directory 'Contoso'.`

IntermediateTroubleshootingIdentity and Authorization Errors
Answer

Likely causes → Wrong client ID or tenant ID in config, the app was deleted, or the app lives in another tenant and has no service principal here.

Diagnose →

az ad sp show --id <clientId>
az ad app show --id <clientId>

Fix →

  1. Correct the client ID / tenant ID pair (common when copying between environments)
  2. Recreate the service principal: az ad sp create --id <appId> for multi-tenant apps
  3. Restore deleted apps from Entra's deleted items within 30 days

Prevent → Store client/tenant IDs per environment, not hard-coded.

Azure All Azure questions Roadmap: Azure core services

More on Identity and Authorization Errors