Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Register Microsoft Entra ID apps and configure OAuth 2.0 authentication with MSAL integration.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/sdk/azure-identity-dotnet.md
1# Authentication — .NET SDK Quick Reference23> Condensed from **azure-identity-dotnet**. Full patterns (ASP.NET DI,4> sovereign clouds, brokered auth, certificate credentials)5> in the **azure-identity-dotnet** plugin skill if installed.67## Install8dotnet add package Azure.Identity910## Quick Start11> **Auth:** `DefaultAzureCredential` is for local development. See [auth-best-practices.md](../auth-best-practices.md) for production patterns.1213```csharp14using Azure.Identity;15var credential = new DefaultAzureCredential();16```1718## Best Practices19- Use DefaultAzureCredential for **local development only**. In production, use deterministic credentials (ManagedIdentityCredential) — see [auth-best-practices.md](../auth-best-practices.md)20- Reuse credential instances — single instance shared across clients21- Configure retry policies for credential operations22- Enable logging with AzureEventSourceListener for debugging auth issues23