azure-identity-java

Authenticate Java applications with Azure SDKs using multiple credential types.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Azure Identity provides a unified authentication model for Java applications using Azure SDKs, simplifying the integration of multiple credential sources (environment variables, managed identities, service principals, Azure CLI, and more) into a single, consistent approach.

Core Features & Use Cases

  • Supports a wide range of credentials including DefaultAzureCredential, ManagedIdentityCredential, EnvironmentCredential, ClientSecretCredential, ClientCertificateCredential, AzureCliCredential, InteractiveBrowserCredential, DeviceCodeCredential, ChainedTokenCredential, and WorkloadIdentityCredential.
  • Enables seamless authentication for common Azure services (Key Vault, Storage, Cosmos, etc.) across local development and cloud deployments.

Quick Start

Install the azure-identity library in your Java project and instantiate a credential (e.g., DefaultAzureCredential) to begin authenticating Azure SDK clients.

Frequently Asked Questions about azure-identity-java

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

FAQPage Schema
How do I authenticate Java applications with Azure SDKs?

You authenticate Java applications with Azure SDKs by using a unified credential surface like DefaultAzureCredential to provide seamless access across local development and cloud deployments. It simplifies integrating multiple credential sources into a single consistent approach.

What is DefaultAzureCredential and how does it work for Java?

DefaultAzureCredential is a unified authentication model that combines multiple credential sources like environment variables, managed identities, and Azure CLI into a single chain. It automatically selects the appropriate credential based on the environment.

Can I use managed identity to authenticate Azure SDK clients in Java?

Yes, you can use ManagedIdentityCredential to authenticate Azure SDK clients in Java. It enables seamless cloud deployment authentication for services like Key Vault and Storage without requiring explicit secrets.

Does Azure Identity for Java support service principal authentication in CI/CD pipelines?

Yes, Azure Identity for Java supports CI/CD pipelines through ClientSecretCredential and ClientCertificateCredential. These credentials allow automated workflows to authenticate Azure SDK clients without interactive logins.

What is the best way to handle multiple credential types for Azure services in Java?

Using ChainedTokenCredential is the best way to handle multiple credential types. It allows you to define a custom sequence of credentials, trying each in order until one succeeds for your Azure SDK clients.

When should I use EnvironmentCredential versus InteractiveBrowserCredential for Azure authentication?

Use EnvironmentCredential for automated environments relying on environment variables, and InteractiveBrowserCredential for local development requiring manual user login. Both authenticate Azure SDK clients but target different deployment contexts.