Azure Key Vault for Administrators: Secrets, Keys, Certificates, Access Control and Managed Identities

Microsoft Certified Azure Administrator Associate AZ 103 55 min min read Updated: Nov 17, 2026 Intermediate
Azure Key Vault for Administrators: Secrets, Keys, Certificates, Access Control and Managed Identities
Intermediate Topic 1 of 3

What Key Vault Stores

ObjectExamples
SecretsPasswords, connection strings, API keys
KeysRSA or EC keys for encryption and signing
CertificatesTLS certificates with renewal

Create and Use

bash az keyvault create -g rg-sec -n kv-demo-482 -l centralindia --enable-rbac-authorization true --retention-days 90 --enable-purge-protection true az role assignment create --assignee asha@contoso.com --role "Key Vault Secrets Officer" --scope $(az keyvault show -n kv-demo-482 --query id -o tsv) az keyvault secret set --vault-name kv-demo-482 -n DbPassword --value '<StrongPassword>' az keyvault secret show --vault-name kv-demo-482 -n DbPassword --query value -o tsv az keyvault secret list --vault-name kv-demo-482 -o table

Access Control

ModelNotes
Azure RBAC (recommended)Roles: Key Vault Secrets User, Secrets Officer, Crypto User, Certificates Officer, Administrator, Reader
Access policies (older)Per-vault list of permissions for secrets, keys and certificates
  • Two planes: management plane (create and configure the vault) and data plane (read and write secrets)
  • Give apps managed identities and the minimum role (usually Secrets User)

Protection

  • Soft delete: deleted vaults and objects can be recovered during retention (7 to 90 days)
  • Purge protection: nobody can permanently delete before retention ends. Needed for customer-managed keys
  • Back up and monitor with diagnostic logs
bash az keyvault secret delete --vault-name kv-demo-482 -n DbPassword az keyvault secret recover --vault-name kv-demo-482 -n DbPassword az keyvault list-deleted -o table

Network Access

  • Use the Key Vault firewall to allow selected VNets and IPs, or a private endpoint with privatelink.vaultcore.azure.net DNS and disable public access
  • Allow trusted Microsoft services when needed (for example for backup and disk encryption)

Managed Identities

TypeUse
System-assignedOne resource. Created and deleted with it
User-assignedShared by many resources, lives independently
bash az webapp identity assign -g rg-web -n webapp-demo-482 PID=$(az webapp identity show -g rg-web -n webapp-demo-482 --query principalId -o tsv) az role assignment create --assignee $PID --role "Key Vault Secrets User" --scope $(az keyvault show -n kv-demo-482 --query id -o tsv) az webapp config appsettings set -g rg-web -n webapp-demo-482 --settings DB_PASSWORD="@Microsoft.KeyVault(SecretUri=https://kv-demo-482.vault.azure.net/secrets/DbPassword/)"

Now the app reads DB_PASSWORD as an environment variable and the secret value never appears in your code or settings.

Certificates and Rotation

  • Key Vault can create or import certificates, auto-renew from integrated CAs and notify before expiry
  • Use versionless secret URIs so apps pick up new versions
  • Rotate secrets on a schedule and after any exposure

Practice

  1. Create a vault with RBAC and purge protection
  2. Store a secret and read it using a managed identity from an App Service
  3. Delete and recover a secret
  4. Restrict the vault to a VNet with a private endpoint

Conclusion

Key Vault keeps secrets, keys and certificates safe. Use RBAC with least privilege, managed identities for apps, soft delete and purge protection, and private networking.

Quick Summary: objects; create; access; protection; network; identities; rotation.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators