Azure Identity (Python)

Microsoft Entra ID token authentication for Azure SDK clients in Python

SDK
PyPI
v1.25.3
5,609 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
89%
Apache 2.0

Apache Airflow

Data Engineering

46,995

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
64
Dependency
Built with
Python 89%
Updated 4 days ago
Python
62%
MIT

AutoGen

AI Development · Automation

61,194

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
56
Repo Health
78
Technical
73
Dependency
Built with
Python 62%
C# 25%
TypeScript 12%
Updated 5 months ago
Python
82%
MIT

CertMate

Devops · Security

1,435

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
83
Repo Health
84
Technical
70
Dependency
Built with
Python 82%
Updated 5 days ago
C++
68%
Apache 2.0

ClickHouse

Analytics · Data Engineering · Databases

50,116

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
64
Dependency
Built with
C++ 68%
Python 14%
Updated 4 days ago
Rust
52%
Apache 2.0

cocoindex

AI Development · Data Engineering

11,607

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

View details
87
Repo Health
85
Technical
65
Dependency
Built with
Rust 52%
Python 48%
Updated 4 days ago
TypeScript
50%
Other

Dify

AI Development · Design Tools · Developer Tools

157,364

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

View details
92
Repo Health
85
Technical
66
Dependency
Built with
TypeScript 50%
Python 47%
Updated 4 days ago
Python
64%
Other

Keep

Automation · Devops · Monitoring

12,359

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
89
Repo Health
79
Technical
66
Dependency
Built with
Python 64%
TypeScript 36%
Updated 1 weeks ago
Python
82%
MIT

LiteLLM

AI Development · Developer Tools

59,745

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
69
Dependency
Built with
Python 82%
TypeScript 12%
Updated 4 days ago
Svelte
32%
GPL 3.0

Mathesar

Databases

5,136

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

View details
84
Repo Health
80
Technical
71
Dependency
Built with
Svelte 32%
TypeScript 27%
Python 21%
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