Setup & Installation
What This Skill Does
Azure Identity is the authentication library for .NET Azure SDK clients. It handles credential acquisition against Microsoft Entra ID, supporting managed identities, service principals, developer tools, and interactive flows through a unified API. DefaultAzureCredential automatically tries multiple auth methods in sequence, so the same code works in local dev and production.
Instead of manually implementing OAuth token flows or managing credential refresh, the library handles token caching, retry, and environment detection automatically across every Azure SDK client.
When to use it
- Authenticating Azure SDK clients (Blob Storage, Key Vault) without hardcoding secrets
- Switching from AzureCliCredential locally to ManagedIdentityCredential in production with no code changes
- Configuring user-assigned managed identity on an AKS workload using a client ID
- Chaining fallback credentials with ChainedTokenCredential for multi-environment deployments
- Authenticating against Azure Government or China sovereign cloud endpoints