Azure Identity library for Rust
Microsoft Entra ID authentication for Azure SDK clients.
Use this skill when:
- An app needs to authenticate to Azure services from Rust
- You need
DeveloperToolsCredentialfor local development - You need
ManagedIdentityCredentialfor Azure-hosted workloads - You need service principal auth with secret or certificate
IMPORTANT: Only use official
azure_*crates published by the azure-sdk crates.io user. Do NOT use the deprecatedazure_sdk_*crates (MindFlavor/AzureSDKForRust) or community crates. Official crates use underscores in names and none have version 0.21.0.
Note: The Rust SDK does not have
DefaultAzureCredential. UseDeveloperToolsCredentialfor local development andManagedIdentityCredentialfor production.
rust
// Incorrect in Rust: this type does not exist in azure_identity
use azure_identity::DefaultAzureCredential;Installation
sh
cargo add azure_identity azure_core tokioIf your code uses
azure_coretypes directly, addazure_coretoCargo.toml. If you only use service-crate re-exports, directazure_coredependency is optional.
Environment Variables
bash