Azure Identity (Python)

Microsoft Entra ID token authentication for Azure SDK clients in Python

SDK
PyPI
v1.26.0
5,621 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
98 /100 Excellent
Development Activity 100
Maintenance 96
Community 96
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
77 /100 Good
Architecture 85
Code Quality 88
Innovation 72
Learning Curve 62

Azure Identity is Microsoft’s official Python library for authenticating against Microsoft Entra ID (formerly Azure AD) and acquiring the OAuth tokens every other Azure SDK client needs to call Azure services. It ships a set of TokenCredential implementations covering interactive browser login, managed identity, service principals, environment-variable credentials, and chained fallback strategies like DefaultAzureCredential, so applications can authenticate consistently across local development, CI, and production Azure environments.

What You Get

  • DefaultAzureCredential, a chained credential that tries environment, managed identity, and developer-tool credentials in order
  • Dedicated credential classes for service principals, certificates, managed identity, and workload identity federation
  • Interactive and device-code credential flows for CLI tools and local development
  • An async credential API mirroring the sync API for asyncio-based services
  • Token caching (persistent and in-memory) to avoid redundant authentication round-trips

Common Use Cases

  • Authenticating an Azure SDK client (Blob Storage, Key Vault, Cosmos DB) from a Python application running on Azure
  • Using DefaultAzureCredential so the same code authenticates locally via Azure CLI login and in production via managed identity
  • Authenticating CI/CD pipelines against Azure resources via service principal or workload identity federation credentials
  • Building internal tools that need interactive or device-code login flows against Microsoft Entra ID

Under The Hood

Architecture - The package centers on the TokenCredential/SupportsTokenInfo protocol from azure-core; each credential class in azure/identity/_credentials/ implements that protocol independently, and DefaultAzureCredential composes several of them into a single fallback chain, with a mirrored aio subpackage providing async equivalents of every credential. Tech Stack - Pure Python (3.9+), built on azure-core for the shared pipeline/transport abstractions, msal/msal-extensions for the underlying Microsoft Authentication Library protocol implementation, and cryptography for certificate-based credential flows; packaged as part of the Azure SDK for Python monorepo under sdk/identity/azure-identity. Code Quality - The tests/ directory contains dedicated sync and async test modules per credential type (AAD client, app service, auth code, managed identity, etc.), plus recorded-test-case infrastructure and live integration tests, reflecting Microsoft’s SDK-wide testing conventions across a very large monorepo. API Design - Every credential exposes the same get_token()/get_token_info() surface regardless of the underlying auth mechanism, so credentials are interchangeable wherever an Azure SDK client accepts a TokenCredential, though the sheer number of credential classes (a dozen-plus) means picking the right one for a given environment has a real learning curve, addressed by extensive docs like TROUBLESHOOTING.md and TOKEN_CACHING.md.

Used by 15 apps in this directory

Python
58%
Apache 2.0

MLflow

AI Development · Monitoring

28,512

The open source AI engineering platform for debugging, evaluating, monitoring, and optimizing production LLMs and agents at scale.

View details
96
Repo Health
86
Technical
67
Dependency
Built with
Python 58%
TypeScript 35%
Updated 5 days ago
TypeScript
84%
Apache 2.0

nao

AI Development · Analytics

1,949

Build and deploy an open-source analytics agent that understands your data warehouse and answers business questions in plain English.

View details
85
Repo Health
76
Technical
67
Dependency
Built with
TypeScript 84%
Python 15%
Updated 5 days ago
Python
38%
Other

Open WebUI

AI Agents · AI Assistants

156,607

The extensible, privacy-first AI platform that runs Ollama, OpenAI, and any LLM backend behind a polished, feature-packed web interface.

View details
92
Repo Health
75
Technical
66
Dependency
Built with
Python 38%
Svelte 35%
JavaScript 19%
Updated 5 days ago
TypeScript
50%
Other

Phase Console

Devops · Security

931

End-to-end encrypted secrets management for engineering teams — from local dev to Kubernetes production.

View details
85
Repo Health
73
Technical
63
Dependency
Built with
TypeScript 50%
Python 48%
Updated 6 days ago
Python
49%
Other

Arize Phoenix

Analytics · Devops · Monitoring

11,976

Open-source AI observability platform for tracing, evaluating, and debugging LLM applications with built-in intelligence and MCP support.

View details
92
Repo Health
88
Technical
67
Dependency
Built with
Python 49%
TypeScript 43%
Updated 5 days ago
Python
79%
AGPL 3.0

Skyvern

AI Agents · Automation

23,257

Skyvern (YC S2023) automates browser-based workflows by pairing LLMs with computer vision, letting agents click, fill, and extract data on sites they've never seen, without brittle XPath selectors that break on every layout change.

View details
89
Repo Health
82
Technical
70
Dependency
Built with
Python 79%
TypeScript 19%
Updated 5 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers