sickn33/antigravity-awesome-skills/azure-identity-dotnet
Claude Code and agent skill by sickn33/antigravity-awesome-skills
- community
Checking that the SKILL.md file is still in the repository.
Azure Identity SDK for .NET. Authentication library for Azure SDK clients using Microsoft Entra ID. Use for DefaultAzureCredential, managed identity, service principals, and developer credentials.
Install
npx vskill@latest install sickn33/antigravity-awesome-skills/azure-identity-dotnetSKILL.md
Azure.Identity (.NET)
Authentication library for Azure SDK clients using Microsoft Entra ID (formerly Azure AD).
Installation
Version context: Examples reference the 1.17/1.18 generation; verify the installed package and target framework rather than treating these as current releases.
Environment Variables
Service Principal with Secret
Service Principal with Certificate
Managed Identity
Credential chains and broker inclusion change with SDK version and optional packages. Check the effective identity/tenant and constrain production credentials explicitly; authentication alone grants no resource-operation authority. Keep tokens, certificate passwords and diagnostic output private. The certificate-loading example needs a runtime supporting X509CertificateLoader and a private-key-bearing PKCS#12 file. See credential chains and PKCS#12 loading.
DefaultAzureCredential
The recommended credential for most scenarios. Tries multiple authentication methods in order:
| Order | Credential | Enabled by Default | |
|---|---|---|---|
| 1 | EnvironmentCredential | Yes | |
| 2 | WorkloadIdentityCredential | Yes | |
| 3 | ManagedIdentityCredential | Yes | |
| 4 | VisualStudioCredential | Yes | |
| 5 | VisualStudioCodeCredential | Yes | |
| 6 | AzureCliCredential | Yes | |
| 7 | AzurePowerShellCredential | Yes | |
| 8 | AzureDeveloperCliCredential | Yes | |
| 9 | InteractiveBrowserCredential | No |
Basic Usage
ASP.NET Core with Dependency Injection
Customizing DefaultAzureCredential
Credential Types
ManagedIdentityCredential (Production)
ClientSecretCredential
ClientCertificateCredential
ChainedTokenCredential (Custom Chain)
Developer Credentials
Environment-Based Configuration
Sovereign Clouds
Credential Types Reference
| Category | Credential | Purpose | |
|---|---|---|---|
| Chains | DefaultAzureCredential | Preconfigured chain for dev-to-prod | |
ChainedTokenCredential | Custom credential chain | ||
| Azure-Hosted | ManagedIdentityCredential | Azure managed identity | |
WorkloadIdentityCredential | Kubernetes workload identity | ||
EnvironmentCredential | Environment variables | ||
| Service Principal | ClientSecretCredential | Client ID + secret | |
ClientCertificateCredential | Client ID + certificate | ||
ClientAssertionCredential | Signed client assertion | ||
| User | InteractiveBrowserCredential | Browser-based auth | |
DeviceCodeCredential | Device code flow | ||
OnBehalfOfCredential | Delegated identity | ||
| Developer | AzureCliCredential | Azure CLI | |
AzurePowerShellCredential | Azure PowerShell | ||
AzureDeveloperCliCredential | Azure Developer CLI | ||
VisualStudioCredential | Visual Studio |
Best Practices
1. Use Deterministic Credentials in Production
2. Reuse Credential Instances
3. Configure Retry Policies
4. Enable Logging for Debugging
Error Handling
Key Exceptions
| Exception | Description | |
|---|---|---|
AuthenticationFailedException | Base exception for authentication errors | |
CredentialUnavailableException | Credential cannot authenticate in current environment | |
AuthenticationRequiredException | Interactive authentication is required |
Managed Identity Support
Supported Azure services:
- Azure App Service and Azure Functions
- Azure Arc
- Azure Cloud Shell
- Azure Kubernetes Service (AKS)
- Azure Service Fabric
- Azure Virtual Machines
- Azure Virtual Machine Scale Sets
Thread Safety
All credential implementations are thread-safe. A single credential instance can be safely shared across multiple clients and threads.
Related SDKs
| SDK | Purpose | Install | |
|---|---|---|---|
Azure.Identity | Authentication (this SDK) | dotnet add package Azure.Identity | |
Microsoft.Extensions.Azure | DI integration | dotnet add package Microsoft.Extensions.Azure | |
Azure.Identity.Broker | Brokered auth (Windows) | dotnet add package Azure.Identity.Broker |
Reference Links
| Resource | URL | |
|---|---|---|
| NuGet Package | https://www.nuget.org/packages/Azure.Identity | |
| API Reference | https://learn.microsoft.com/dotnet/api/azure.identity | |
| Credential Chains | https://learn.microsoft.com/dotnet/azure/sdk/authentication/credential-chains | |
| Best Practices | https://learn.microsoft.com/dotnet/azure/sdk/authentication/best-practices | |
| GitHub Source | https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity |
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/azure-identity-dotnet/SKILL.md
Popularity
- Repository stars
- 26,362
- Repository forks
- 4,496
- Repository npm downloads, 7 days
- 6,951
- 7-day trend score
- 72
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 21 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sickn33/antigravity-awesome-skills/azure-identity-dotnet)