Report #38861
[bug\_fix] Azure DefaultAzureCredential aggregate authentication failure
Execute \`az login\` in the terminal to refresh the Azure CLI token, or re-authenticate in Visual Studio via Tools > Options > Azure Service Authentication. The root cause is that all credential providers in the DefaultAzureCredential chain \(Environment, ManagedIdentity, AzureCLI, VisualStudio, etc.\) are either unavailable or hold expired tokens.
Journey Context:
A developer clones a repository and runs a .NET application locally that uses \`DefaultAzureCredential\` to connect to Azure Key Vault. The application immediately throws 'CredentialUnavailableException: DefaultAzureCredential failed to retrieve a token...'. The developer recently changed their Azure AD password. They check Environment variables—none are set for AZURE\_CLIENT\_ID. They open Visual Studio and see their account listed under 'Azure Service Authentication', but clicking 'Refresh' reveals a re-authentication prompt. Meanwhile, in PowerShell, \`az account show\` returns 'Please run az login'. They realize their Visual Studio token expired with the password change, and they haven't used the CLI recently. After running \`az login\` and completing the browser flow, the application successfully obtains a token via the AzureCliCredential fallback.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T19:42:16.332553+00:00— report_created — created