azure-identity-py

Authenticate Python applications to Azure services using DefaultAzureCredential.

2.9k|323|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/microsoft/skills --skill azure-identity-py-microsoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-identity-py
Source: https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-python/skills/azure-identity-py
Command: npx skills add https://github.com/microsoft/skills --skill azure-identity-py-microsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Authenticate Python applications to Azure services using a unified credential provider.

Core Features & Use Cases

  • Unified credential chain with DefaultAzureCredential supporting environment, managed identity, and service principal authentication.
  • Seamless integration with Azure SDKs in Python, enabling secure token acquisition and caching for repeated calls.
  • Real-world use cases include local development, cloud deployments, and automated tooling that runs across environments.

Quick Start

Install azure-identity and instantiate DefaultAzureCredential to authenticate Python apps against Azure.

Frequently Asked Questions about azure-identity-py

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I authenticate Python apps to Azure services using a unified credential chain?

Authenticate Python apps to Azure services by instantiating DefaultAzureCredential, which provides a unified credential chain that automatically selects the first available method from environment variables, managed identity, or service principals.

What is DefaultAzureCredential and how does it work for Azure identity authentication?

DefaultAzureCredential is a unified credential provider that automates Azure identity authentication by sequentially trying environment variables, managed identities, and user or service principals to acquire access tokens.

Can I use managed identity for Azure authentication in Python cloud deployments?

Yes, you can use managed identity for Azure authentication in Python cloud deployments by using DefaultAzureCredential, which seamlessly integrates managed identity alongside environment and service principal methods.

Does Azure identity authentication for Python support token caching for repeated SDK calls?

Yes, Azure identity authentication for Python supports token caching, enabling secure token acquisition and caching for repeated calls to optimize performance across local development and cloud deployments.

What is the best way to handle Azure authentication across local development and cloud deployments in Python?

The best way to handle Azure authentication across local development and cloud deployments in Python is using DefaultAzureCredential, which provides a unified credential chain that auto-selects the appropriate method for each environment.