Sign in
Explore
Skills · SkillDevOps & CloudReviewed

azure-identity-java

Azure Identity for Java: DefaultAzureCredential, managed identity, service principals and other Azure authentication patterns.

Kind
Skill
Works with
Claude Code
Languages
Java / Kotlin
Source
microsoft/skills @ 2130750147de
Path
.github/plugins/azure-sdk-java/skills/azure-identity-java/SKILL.md
License
MIT
Jobs
Implementation
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Azure Identity library for Java

Authentication library for Azure SDK clients using Microsoft Entra ID.

## Installation

```xml
<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-identity</artifactId>
    <version>1.15.0</version>
</dependency>
```

## Key Concepts

| Credential | Use Case |
|------------|----------|
| `DefaultAzureCredential` | **Recommended** - Works in dev and production |
| `ManagedIdentityCredential` | Azure-hosted apps (App Service, Functions, VMs) |
| `EnvironmentCredential` | CI/CD pipelines with env vars |
| `ClientSecretCredential` | Service principals with secret |
| `ClientCertificateCredential` | Service principals with certificate |
| `AzureCliCredential` | Local dev using `az login` |
| `InteractiveBrowserCredential` | Interactive login flow |
| `DeviceCodeCredential` | Headless device authentication |

## DefaultAzureCredential (Recommended)

The `DefaultAzureCredential` tries multiple authentication methods in order. See [DefaultAzureCredential overview](https://aka.ms/azsdk/java/identity/credential-chains#defaultazurecredential-overview) for the current credential chain order and defaults.

```java
…