Azure Identity library for Python
Authentication library for Azure SDK clients using Microsoft Entra ID.
Use this skill when:
- An app needs to authenticate to Azure services from Python
- You need
DefaultAzureCredentialfor local dev + Azure deployment - You need
ManagedIdentityCredentialfor Azure-hosted workloads - You need service principal auth with secret or certificate
- You need direct token acquisition with
get_token() - You need to troubleshoot credential chain failures
Installation
bash
pip install azure-identityFor VS Code or broker-based desktop auth:
bash
pip install azure-identity-brokerPython Version
azure-identity supports Python 3.9+.
Environment Variables
bash
# Service principal with client secret