agentsclimarketplace

Azure identity rust

Skill sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills/skills/azure-identity-rust

AAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 1,987+ agentic skills. Includes CLI, local MCP, catalog, plugins, and Workbench.

Install
npx -y skills add sickn33/agentic-awesome-skills --skill azure-identity-rust

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Azure Identity SDK for Rust authentication. Use for DeveloperToolsCredential, ManagedIdentityCredential, ClientSecretCredential, and token-based authentication.

SKILL.md

3.7 KB, as published. Nobody here has run it

Azure Identity SDK for Rust

Authentication library for Azure SDK clients using Microsoft Entra ID (formerly Azure AD).

Installation

cargo add azure_identity

Environment Variables

# Service Principal (for production/CI)
AZURE_TENANT_ID=<your-tenant-id>
AZURE_CLIENT_ID=<your-client-id>
AZURE_CLIENT_SECRET=<your-client-secret>

# User-assigned Managed Identity (optional)
AZURE_CLIENT_ID=<managed-identity-client-id>

DeveloperToolsCredential

The recommended credential for local development. Tries developer tools in order (Azure CLI, Azure Developer CLI):

use azure_identity::DeveloperToolsCredential;
use azure_security_keyvault_secrets::SecretClient;

let credential = DeveloperToolsCredential::new(None)?;
let client = SecretClient::new(
    "https://my-vault.vault.azure.net/",
    credential.clone(),
    None,
)?;

Credential Chain Order

OrderCredentialEnvironment
1AzureCliCredentialaz login
2AzureDeveloperCliCredentialazd auth login

Credential Types

CredentialUsage
DeveloperToolsCredentialLocal development - tries CLI tools
ManagedIdentityCredentialAzure VMs, App Service, Functions, AKS
WorkloadIdentityCredentialKubernetes workload identity
ClientSecretCredentialService principal with secret
ClientCertificateCredentialService principal with certificate
AzureCliCredentialDirect Azure CLI auth
AzureDeveloperCliCredentialDirect azd CLI auth
AzurePipelinesCredentialAzure Pipelines service connection
ClientAssertionCredentialCustom assertions (federated identity)

ManagedIdentityCredential

For Azure-hosted resources:

use azure_identity::ManagedIdentityCredential;

// System-assigned managed identity
let credential = ManagedIdentityCredential::new(None)?;

// User-assigned managed identity
let options = ManagedIdentityCredentialOptions {
    client_id: Some("<user-assigned-mi-client-id>".into()),
    ..Default::default()
};
let credential = ManagedIdentityCredential::new(Some(options))?;

ClientSecretCredential

For service principal with secret:

use azure_identity::ClientSecretCredential;

let credential = ClientSecretCredential::new(
    "<tenant-id>".into(),
    "<client-id>".into(),
    "<client-secret>".into(),
    None,
)?;

Best Practices

  1. Use DeveloperToolsCredential for local dev — automatically picks up Azure CLI
  2. Use ManagedIdentityCredential in production — no secrets to manage
  3. Clone credentials — credentials are Arc-wrapped and cheap to clone
  4. Reuse credential instances — same credential can be used with multiple clients
  5. Use tokio featurecargo add azure_identity --features tokio

Reference Links

ResourceLink
API Referencehttps://docs.rs/azure_identity
Source Codehttps://github.com/Azure/azure-sdk-for-rust/tree/main/sdk/identity/azure_identity
crates.iohttps://crates.io/crates/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.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.