Home › Studies › AI-200 › Secure & Monitor › Key Vault & App Configuration

Key Vault & App Configuration

Key Vault secrets · RBAC roles · references · soft-delete · rotation · App Configuration keys, labels, refresh, roles, snapshots

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

Key Vault secrets

Azure RBAC roleWhat it does
Key Vault Secrets UserRead secret contents
Key Vault Secrets OfficerAny action on secrets, except manage permissions
Key Vault ReaderRead metadata only. Cannot read secret contents or key material
Key Vault Crypto OfficerAny action on keys, except manage permissions
Key Vault AdministratorAll data plane operations on the vault and its objects

These roles work only for vaults that use the Azure role-based access control permission model. RBAC is recommended. Legacy access policies are not.

Retrieve secrets in code and from app settings

Soft-delete and purge protection

Rotation

AssetAutorotation
KeysNew key versions from a rotation policy
SecretsEvent-triggered updates (Event Grid + Azure Functions)
CertificatesAutomatic renewal before expiry

App Configuration

RoleAccess
App Configuration Data ReaderRead key-values (data plane)
App Configuration Data OwnerRead, write and delete key-values (data plane)
App Configuration ContributorManage the store resource, not the data. Can read access keys
App Configuration ReaderRead the store resource, not access keys or data

Allow up to 15 minutes for a new role assignment to propagate. Managed identity can't authenticate an app that runs locally.

Snapshots, events and tiers

CLI and PowerShell

TaskAzure CLIPowerShell
Create a vault with RBAC and purge protectionaz keyvault create --name "<vault-name>" --resource-group "myResourceGroup" --enable-rbac-authorization true --enable-purge-protection true-
Create a secretaz keyvault secret set --vault-name "<vault-name>" --name "ExamplePassword" --value "hVFkk965BuUv"-
Show a secret valueaz keyvault secret show --name "ExamplePassword" --vault-name "<vault-name>" --query "value"-
Set a key rotation policy from a fileaz keyvault key rotation-policy update --vault-name <vault-name> --name <key-name> --value </path/to/policy.json>-
Rotate a key nowaz keyvault key rotate --vault-name <vault-name> --name <key-name>-
Install the Microsoft Entra identity library (Python)-pip install azure-identity
Install the Key Vault secrets library (Python)-pip install azure-keyvault-secrets
Create a secret client (Python)-client = SecretClient(vault_url=KVUri, credential=credential)
Read a secret (Python)-retrieved_secret = client.get_secret(secretName)
Install the App Configuration provider (Python)-pip install azure-appconfiguration-provider
Load settings with Microsoft Entra ID (Python)-config = load(endpoint=endpoint, credential=credential)
Filter keys and labels (Python)-selects = {SettingSelector(key_filter="message*", label_filter="\0")}

Exam Tips

Tick each tip once you can answer it without looking.

“App Service app reads a Key Vault secret through an app setting; vault uses RBAC” → Key Vault Secrets User for the managed identity. Trap: Key Vault Reader can't read secret contents. Secrets Officer does more than read.

“Vault uses access policies; identity only reads secrets” → Get permission on secrets. Trap: List only lists. Set creates. Purge deletes permanently.

“Valid Key Vault reference” → @Microsoft.KeyVault(SecretUri=...full URI...) or (VaultName=...;SecretName=...). Trap: SecretUri must be the full data-plane URI. The prefix is @Microsoft.KeyVault.

“Rotated secret, reference has no version” → App uses the new version within 24 hours; a config change refetches at once. Trap: Pin a version and the app stays on it.

“References with a user-assigned identity” → Set keyVaultReferenceIdentity to the identity's resource ID. Trap: System-assigned is the default. The client ID isn't what the property takes.

“Secret deleted by mistake, default vault” → Recoverable for 90 days; interval 7 to 90 set only at creation. Trap: Soft-delete can't be disabled. Purge is a second, separate step.

“Secret needs automatic replacement before expiry” → Event Grid near-expiry event to a function that creates a new version and updates the service. Trap: Rotation policies are for keys. The exp attribute is informational.

“Order of the SQL password rotation” → Near-expiry event, Event Grid POST, new secret version, SQL update. Trap: Key Vault publishes the event 30 days before expiry. Event Grid retries for two hours.

“Who manages a key rotation policy under RBAC?” → Key Vault Crypto Officer; minimum rotation interval seven days. Trap: Rotation re-wraps data keys. It doesn't re-encrypt data.

“Where do settings live and where do secrets live?” → Settings in App Configuration; secrets in Key Vault. Trap: Don't use Key Vault as a configuration store. App Configuration complements it.

“Python read of a secret” → DefaultAzureCredential, SecretClient, get_secret. Trap: set_secret writes. begin_delete_secret deletes. Hard-coded credentials are discouraged.

“Same key, different value per environment” → Labels (Test, Staging, Production); \0 is no label. Trap: Keys are case-sensitive. Don't use case to tell keys apart.

“Update many key-values, reload once” → Monitor a sentinel key and change it last. Trap: Monitoring all selected keys reloads on any single change.

“App only reads App Configuration data” → App Configuration Data Reader. Trap: Data Owner can write and delete. The Reader and Contributor roles act on the resource, not the data.

“Secret value delivered through an App Configuration key” → Key Vault reference key; identity needs Data Reader and Key Vault Secrets User. Trap: The two services don't talk to each other. A Data Reader role alone isn't enough.

“Immutable known-good configuration for rollout” → Snapshot: create and archive, can't edit or delete. Trap: Retention is fixed at creation (30 days Standard and Premium, 7 days Free and Developer).

Sources

Checked against Microsoft Learn on November 13, 2026.

← Secure & Monitor overviewOpenTelemetry & KQL →