← Explore all skills

CLOUD DEVELOPMENT / Microsoft

Azure Identity library for .NET

Microsoft's .NET guide to choosing an Azure.Identity credential: DefaultAzureCredential while developing, a specific managed identity in production, plus service principal, developer and sovereign-cloud options.

“Azure Identity library for .NET. Authentication library for Azure SDK clients using Microsoft Entra ID. Use for DefaultAzureCredential, managed identity, service principals, and developer credentials. Triggers: "Azure Identity", "DefaultAzureCredential", "ManagedIdentityCredential", "ClientSecretCredential", "authentication .NET", "Azure auth", "credential chain". ”

01 / THE REASONING

Why this made the selection.

  • Practice 1 keeps DefaultAzureCredential for development and builds a ManagedIdentityCredential from a user-assigned client ID for production, and the environment-based sample switches between the two on builder.Environment.IsProduction().
  • It names the environment variables for a service principal with a secret, with a certificate, and for a user-assigned managed identity, and tabulates credential types under chains, Azure-hosted, service principal, user and developer.
  • Its error handling separates AuthenticationFailedException from CredentialUnavailableException, and it states that all credential implementations are thread-safe so one instance can be shared across clients.

02 / THE REVIEW RECORD

What we actually inspected.

Source review has boundaries.
A clear record is more useful than a “safe” badge.

Material inspected

  • .github/plugins/azure-sdk-dotnet/skills/azure-identity-dotnet/SKILL.md (all 336 lines)
  • .github/plugins/azure-sdk-dotnet/README.md
  • .github/plugins/azure-sdk-dotnet/.claude-plugin/plugin.json
  • README.md
  • LICENSE

Our findings

  • The Installation block adds Azure.Identity, plus Microsoft.Extensions.Azure for ASP.NET Core integration and Azure.Identity.Broker for brokered and Visual Studio Code credential support.
  • DefaultAzureCredential is introduced as "The recommended credential for most scenarios", while practice 1 uses a specific ManagedIdentityCredential in production.
  • Managed identity is listed for App Service and Functions, Arc, Cloud Shell, AKS, Service Fabric, Virtual Machines and Virtual Machine Scale Sets.
  • The retry example sets MaxRetries = 3 and a 0.5-second delay on ManagedIdentityCredentialOptions.
  • The frontmatter declares license MIT, author Microsoft, version 1.0.0 and package Azure.Identity. It declares no allowed-tools.

Not established by this review

  • No credential was constructed and no token was requested.
  • No dotnet package was added and no Storage or Key Vault client was called.
  • The azure-sdk-dotnet plugin was not installed.
  • Not executed: it was not installed or run.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

Add a skill to your workflow.

Upstream setup instructions ↗
  1. The azure-sdk-dotnet plugin README prints `npx skills add microsoft/skills --skill azure-sdk-dotnet` under Install. It installs the whole azure-sdk-dotnet plugin, whose skill table lists azure-identity-dotnet; it does not install azure-identity-dotnet alone.
  2. The same README prints `/plugin install azure-sdk-dotnet@skills`, which also installs the whole plugin. The repository README runs plugin commands inside Copilot CLI after `/plugin marketplace add microsoft/skills`.

Before you start

  • The skill prints `dotnet add package Azure.Identity`, with `dotnet add package Microsoft.Extensions.Azure` for ASP.NET Core integration and `dotnet add package Azure.Identity.Broker` for brokered and Visual Studio Code credentials. This review ran none of them.
  • One credential source the file names: AZURE_CLIENT_ID, AZURE_TENANT_ID and AZURE_CLIENT_SECRET or AZURE_CLIENT_CERTIFICATE_PATH for a service principal; a managed identity on a supported Azure service; or an Azure CLI, Azure PowerShell, azd or Visual Studio sign-in.
  • Copilot CLI, for the `/plugin install azure-sdk-dotnet@skills` line.

04 / FOLLOW THE EVIDENCE

The source trail.

Our notes are separate from the original resource.
Check upstream before adopting a new version.

  1. https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-dotnet/skills/azure-identity-dotnet/SKILL.md

    Supports: name, upstreamDescription, summary, whySelected, bestFor, limitations, review.findings, install.prerequisites, access.permissions

  2. https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-dotnet/README.md

    Supports: install.sourceUrl, install.steps, limitations (install scope)

  3. https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-dotnet/.claude-plugin/plugin.json

    Supports: publisher, license (plugin licence field)

  4. Repository README ↗Checked

    https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/README.md

    Supports: compatibility, install.steps (Copilot CLI plugin commands)

  5. Repository LICENSE ↗Checked

    https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/LICENSE

    Supports: license

  6. https://github.com/microsoft/skills/commit/e1f9cce11758d305e6c77683fe34ccc394586291

    Supports: limitations (last commit date)

Evidence & Ask