rootcastleco/rei-skills/azure-identity-dotnet
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install rootcastleco/rei-skills/azure-identity-dotnetSKILL.md
Azure.Identity (.NET)
Authentication library for Azure SDK clients using Microsoft Entra ID (formerly Azure AD).
Installation
Current Versions: Stable v1.17.1, Preview v1.18.0-beta.2
Environment Variables
Service Principal with Secret
Service Principal with Certificate
Managed Identity
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.
🏰 Rei Skills — Curated by Rootcastle Engineering & Innovation | Batuhan AyrıbaşEngineering Beyond Boundaries | admin@rootcastle.com
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
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
- 6
- Repository forks
- 2
- 7-day trend score
- 15
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
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/rootcastleco/rei-skills/azure-identity-dotnet)