Enterprise subscriptions commonly enforce policies that block local auth. Always design for identity-based access from the start.
Storage accounts: Use identity-based connections with DefaultAzureCredential
Databases: Use Microsoft Entra authentication for Azure SQL and PostgreSQL Flexible Server
Key Vault: Use Key Vault references in App Settings (@Microsoft.KeyVault(SecretUri=...))
Application Insights: Configure ingestion via the connection string app setting (APPLICATIONINSIGHTS_CONNECTION_STRING). Use managed identity for management-plane access (querying, configuring components), not for telemetry ingestion
DefaultAzureCredential with UAMI: Always pass managedIdentityClientId explicitly:
javascript
const credential = new DefaultAzureCredential({ managedIdentityClientId: process.env.AZURE_CLIENT_ID});