Azure Identity (Python)

Microsoft Entra ID token authentication for Azure SDK clients in Python

SDK
PyPI
v1.25.3
5,590stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
98/100Excellent
Development Activity100
Maintenance96
Community96
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
77/100Good
Architecture85
Code Quality88
Innovation72
Learning Curve62

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
90%
Apache 2.0

Apache Airflow

Data Engineering

46,530

Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.

View details
96
Repo Health
89
Technical
66
Dependency
Built with
Python90%
Updated today
Python
62%
MIT

AutoGen

AI Development · Automation

60,518

Build autonomous and human-in-the-loop multi-agent AI systems with a layered, event-driven Python and .NET framework pioneered at Microsoft Research.

View details
57
Repo Health
78
Technical
75
Dependency
Built with
Python62%
C#25%
TypeScript12%
Updated 4 months ago
Python
73%
MIT

CertMate

Security · Devops

1,382

Automate SSL certificate lifecycle across any CA, 24+ DNS providers, and every major secret store — with a REST API, web dashboard, and built-in MCP server for AI-driven ops.

View details
82
Repo Health
84
Technical
70
Dependency
Built with
Python73%
JavaScript12%
HTML12%
Updated yesterday
C++
69%
Apache 2.0

ClickHouse

Databases · Analytics · Data Engineering

49,325

Open-source column-oriented database that delivers real-time analytical queries on petabyte-scale data with millisecond latency.

View details
95
Repo Health
90
Technical
68
Dependency
Built with
C++69%
Python13%
Updated today
Rust
52%
Apache 2.0

cocoindex

Data Engineering · AI Development

11,350

An incremental data indexing engine that keeps AI agent context perpetually fresh by reprocessing only what changed.

View details
87
Repo Health
85
Technical
64
Dependency
Built with
Rust52%
Python48%
Updated yesterday
TypeScript
50%
Other

Dify

No Code Platforms · AI Development · Developer Tools

152,883

Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.

View details
92
Repo Health
85
Technical
71
Dependency
Built with
TypeScript50%
Python47%
Updated today
Python
63%
Other

Keep

Devops · Automation · Monitoring

12,224

The open-source AIOps and alert management platform that unifies 130+ monitoring tools into a single pane of glass with AI-powered correlation, deduplication, and workflow automation.

View details
91
Repo Health
79
Technical
67
Dependency
Built with
Python63%
TypeScript36%
Updated today
Python
84%
MIT

LiteLLM

AI Development · Developer Tools

56,720

Open source AI gateway and Python SDK that gives you one OpenAI-compatible interface to call 100+ LLM providers, with built-in routing, cost tracking, guardrails, and virtual keys.

View details
92
Repo Health
81
Technical
71
Dependency
Built with
Python84%
TypeScript14%
Updated today
Svelte
32%
GPL 3.0

Mathesar

Databases

5,096

Spreadsheet-like interface for your PostgreSQL database — self-hosted, no SQL required, native Postgres access control.

View details
87
Repo Health
80
Technical
72
Dependency
Built with
Svelte32%
TypeScript27%
Python21%
Updated yesterday

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

Search