What Is Azure Key Vault? Secrets, Keys, Certificates and Pricing

Azure Key Vault is Microsoft’s managed cloud service for protecting application secrets, cryptographic keys and certificates. It lets an authorized application retrieve a password or API key when needed, or perform cryptographic operations using a protected key, without keeping that key in its source code. Microsoft Entra ID authenticates the caller; permissions and network controls determine what the caller can actually do.
Imagine an online shop that connects to a payment provider. Instead of storing the provider’s API credential in its Git repository or a deployment script, the shop stores it in Key Vault. The application uses its own managed identity to obtain the credential at runtime. If the credential changes, the application can fetch the new version without having to embed a replacement password in its code.
That is only one use of Key Vault. It also helps organizations manage the encryption keys that protect databases and storage, and manage the certificates that establish trusted TLS connections. These three jobs are related but not interchangeable. This guide explains the difference, the security architecture, how to deploy a vault, and how to avoid both excessive permissions and unnecessary requests.
Table of Contents
Azure Key Vault at a glance
| Question | Answer |
|---|---|
| What is it? | A managed service for secrets, cryptographic keys and certificates |
| Who uses it? | Applications, developers, cloud administrators and security teams |
| How does access work? | Entra identity, data-plane authorization and network access |
| Does it require a VM? | No. Azure manages the underlying service |
| Is it free? | Usage-based charges apply; check eligible offers separately |
| What editions are available? | Standard and Premium vaults; separate Managed HSM pools for hardware-backed keys |
| Does it replace a database? | No. Store business data in the appropriate data service |
Key Vault is part of the wider Microsoft Azure platform. It is not a general password manager for employees, a firewall for your application or a replacement for an identity provider. Its job is to govern sensitive material and selected cryptographic operations. The application remains responsible for using that material securely.
Keys, secrets and certificates: what is the difference?
The easiest way to decide what to store is to ask what the consuming application actually needs. Does it need to read a credential, ask a service to perform a cryptographic operation, or establish a trusted identity using a certificate?
| Object | Typical contents or purpose | What the consumer receives | Example |
|---|---|---|---|
| Secret | Password, API token or connection string | The sensitive value, if authorized | A payment API credential |
| Cryptographic key | RSA, elliptic-curve or supported symmetric key material | Cryptographic operation result; private key material is not ordinarily returned by the key API | Sign a digest or wrap a data encryption key |
| Certificate | X.509 certificate, associated key and secret, and lifecycle policy | Certificate data; private key retrieval depends on exportability and permissions | TLS certificate for a custom domain |
| Nonsecret configuration | Region, public URL, timeout, feature flag | Ordinary configuration data | Use Azure App Configuration or application settings instead |
A password is not the same thing as a cryptographic key object. Even if a vendor calls its authentication credential an “API key,” that value normally belongs in the Secrets section because the application must read and present it to the vendor. Conversely, when your application needs to sign a transaction digest with an RSA private key, a key object can perform the operation without handing the private key to your code.
A certificate adds a binding between a public key and an identity, along with validity information and an issuer’s signature. In Key Vault, certificate creation also produces related key and secret objects. If a certificate is configured as exportable, the associated secret can expose the private key to an appropriately authorized consumer. Nonexportable keys require a compatible integration that uses the key without exporting it. Do not assume every certificate is nonexportable just because it resides in a vault. See Microsoft’s object model and versioning reference and certificate exportability documentation.
A practical object-selection test
For an application connecting to Azure SQL, first investigate Entra-based authentication. If the database and application support it, use a managed identity and grant the corresponding database permission. You may not need a database password at all. For a third-party API that supports only long-lived tokens, use a secret. For customer-controlled storage encryption, use a supported key object. For a TLS endpoint, use the certificate integration that the endpoint actually supports.
| Requirement | Prefer | Why |
|---|---|---|
| Azure service supports workload identity | Managed identity directly | Eliminates an application-managed credential |
| External service requires a password | Key Vault secret | Application still needs the value |
| Storage service must use a customer-managed key | Key Vault key or supported Managed HSM key | Service can use a managed cryptographic key |
| Web endpoint needs TLS certificate lifecycle management | Certificate integration | Renewal, versioning and deployment are distinct tasks |
| Application needs a feature flag | App Configuration | Not sensitive credential material |
| Customer files need encryption | Encrypted data storage plus appropriate key management | Vault is not a file store |
The strongest outcome is often not to store a secret more securely, but to remove the need for that secret entirely. Microsoft describes this approach in its Safe Secrets Standard. A vault is most useful for credentials you cannot eliminate and cryptographic assets that genuinely need independent lifecycle control.
How does Azure Key Vault work?
A vault is an Azure resource in a subscription and resource group, associated with that subscription’s Entra tenant. A vault can be created without deploying a VM. It has a globally unique name and a data endpoint, for example https://example-orders-prod.vault.azure.net. The examples in this article use fictional names; do not attempt to access them. A versioned secret identifier has the form https://<vault-name>.vault.azure.net/secrets/<name>/<version>. Omitting the version generally retrieves the latest secret version. Use the appropriate cloud-specific endpoint for sovereign clouds.

Consider an App Service application with a system-assigned managed identity. The identity is provisioned in Microsoft Entra ID and tied to that resource’s lifecycle. The application obtains a token for the vault service through the Azure identity mechanism. It presents that token to the vault over HTTPS. The vault checks the request’s identity, the assigned permission and the applicable networking restrictions. If the operation is allowed, it returns a secret value or a cryptographic result. The application subsequently uses the credential against the target service, which independently validates access.
A token for Azure Resource Manager is not a substitute for a Key Vault data-plane token. The intended audience matters. Azure SDKs handle the appropriate token acquisition for the configured service endpoint. An identity may be able to sign in but still fail because it is assigned a role in the wrong scope, uses the wrong tenant or is attempting a disallowed operation. For background, see our Microsoft Entra ID guide.
Management plane versus data plane
A common operational error is granting a developer Contributor access to the Azure resource and assuming that this authorizes reading secrets. The management plane configures the vault itself; the data plane handles its contents. The distinction is important for separation of duties.
| Action | Plane | Example role or permission |
|---|---|---|
| Inspect resource configuration | Management | Reader |
| Configure vault properties | Management | Key Vault Contributor |
| Read secret values | Data | Key Vault Secrets User |
| Create or rotate stored secret versions | Data | Key Vault Secrets Officer |
| Use a key for supported cryptographic operations | Data | Key Vault Crypto User |
| Manage cryptographic keys | Data | Key Vault Crypto Officer |
| Assign Azure roles | Management | Authorized role-assignment administrator, subject to scope and conditions |
These are examples, not a universal role assignment recipe. A Secrets User role has read capabilities relevant to secret retrieval; it does not grant permission to create arbitrary new secrets. A Key Vault Contributor does not directly grant reading secret contents in the Azure RBAC model. However, administrators with powerful role-assignment or resource configuration permissions may still be able to change the effective security boundary. Control those privileges as carefully as direct data access.
The Microsoft RBAC guide documents the precise role capabilities and distinguishes the vault data plane from Managed HSM’s local authorization system.
Azure RBAC versus legacy access policies: a current change
For new deployments, prefer Azure role-based access control. It integrates with Azure’s hierarchy of scopes and centralized role administration. Legacy access policies grant vault data operations through vault configuration. In that model, a principal allowed to change the vault’s access policies can potentially grant itself data access. Restrict administrative privileges accordingly.
As of December 3, 2026, Microsoft documents an important infrastructure change: newly created vaults using control-plane API version 2026-02-01 or later default to Azure RBAC. Older control-plane versions are scheduled to retire February 27, 2027. This is distinct from the choice to migrate an existing access-policy vault. Existing vaults do not automatically change authorization model simply because a new API version exists, and the newer API still supports explicit access-policy configuration.
Review your Bicep, ARM, Terraform provider versions and automation before that deadline. Explicitly specify the desired access model, test role assignments in a nonproduction vault, verify consumers and plan a controlled migration. Switching the permission model without preparing equivalent roles can interrupt workloads. See Microsoft’s current access-control transition guidance and migration guide.
For the workload authentication options behind secretless vault access, read our Azure Managed Identity vs Service Principal guide.
Standard, Premium and Managed HSM: which should you choose?
Azure Key Vault offers Standard and Premium vaults. Premium adds hardware-protected cryptographic key options, whereas Managed HSM is a distinct key management resource with dedicated hardware capacity. Premium does not automatically convert all secrets into nonexportable keys, and Managed HSM is not a replacement for the Secrets or Certificates sections of a vault.
| Capability | Standard vault | Premium vault | Managed HSM |
|---|---|---|---|
| Application secrets | Yes | Yes | No |
| Certificate objects | Yes | Yes | No |
| Software-protected RSA/EC keys | Yes | Yes | No |
| HSM-protected keys | No | Yes, supported types | Yes |
| Isolation model | Managed multitenant service | Managed multitenant service | Single-tenant managed HSM pool |
| Main billing model | Transactions and applicable lifecycle charges | Transactions, applicable lifecycle and active HSM key-version charges | Provisioned pool hourly charge |
| Typical selection | Ordinary app secrets and software keys | Workloads requiring hardware-backed keys | Dedicated HSM isolation or specialized cryptographic requirements |
HSM stands for hardware security module: hardware designed to safeguard cryptographic material and execute protected operations. Microsoft’s current overview identifies FIPS-validated cryptographic modules and FIPS 140-3 Level 3 hardware for the Premium HSM offering. Validate the precise certification, key type, algorithm and region against your compliance requirements rather than treating the label “Premium” as compliance on its own. Some newer algorithm support is evolving; consult the Azure key management selection guide before relying on it.
For example, if a small business needs to store a few API credentials, Standard is usually a sensible starting point. If a contract specifically requires hardware-protected encryption keys, evaluate Premium and the actual key type used. If a regulated organization requires a dedicated single-tenant cryptographic boundary, evaluate Managed HSM, including its security-domain recovery procedure, throughput and ongoing pool cost. A payment-specific HSM or Azure Cloud HSM may be more appropriate for specialized payment processing or applications requiring particular HSM interfaces.
How to use Azure Key Vault: a practical setup
Suppose you are deploying an order processing application to Azure App Service. It uses an external payment API that does not support Entra tokens, and it stores orders in a database that does support workload identity. The application should retrieve the payment credential from a vault but use managed identity directly for the database. A separate production vault prevents a test application from inheriting access to production payment credentials.
The following steps are a documentation-based example, not a tested deployment. Use an authorized nonproduction subscription first; Azure resources and requests can incur charges.
Step 1: Create the vault and define its boundary
In the Azure portal, find Key vaults and create a new resource. Select the subscription, resource group, globally unique name, region and tier. Choose Azure RBAC for permissions, decide the recovery retention period, and enable purge protection for production. Choose network restrictions appropriate to the application. For a private deployment, provision the private endpoint and DNS resolution before disabling public access.
Do not place production and development credentials together merely because it is convenient. Define ownership for each vault and its consumers. A naming convention such as application-environment-region can make ownership clear without embedding sensitive information in resource or object names.
Step 2: Create the application identity
Enable a system-assigned identity in the App Service identity settings, or attach a user-assigned identity if your architecture needs a separately managed lifecycle. Record the principal object ID. A user-assigned identity can survive replacement of the application resource, but sharing it across unrelated apps also shares its permissions. That is a design decision, not a default convenience.
Step 3: Grant only the required permissions
In the vault’s Access control (IAM) settings, assign the app’s managed identity Key Vault Secrets User at the vault scope. Separately grant an authorized operator the narrowly scoped ability to set secrets, for example Secrets Officer for the appropriate vault. Do not grant the app the officer role simply because it can do more operations.
The following Azure CLI example illustrates the role assignment for an existing App Service and vault. Run it with an identity permitted to manage role assignments, and verify the subscription context and the resource IDs before execution. The identity must already be enabled.
APP_RG='your-app-resource-group'
APP='your-app-service-name'
VAULT_RG='your-vault-resource-group'
VAULT='your-unique-vault-name'
PRINCIPAL=$(az webapp identity show \
--resource-group "$APP_RG" --name "$APP" \
--query principalId -o tsv)
VAULT_ID=$(az keyvault show --resource-group "$VAULT_RG" \
--name "$VAULT" --query id -o tsv)
# Verify both identifiers before assigning the role.
if [ -n "$PRINCIPAL" ] && [ -n "$VAULT_ID" ]; then
az role assignment create \
--assignee-object-id "$PRINCIPAL" \
--assignee-principal-type ServicePrincipal \
--role 'Key Vault Secrets User' --scope "$VAULT_ID"
fi
Role propagation can take time. A successful role assignment command is not proof that the app can immediately read a secret. Test using the workload identity from the workload’s network, not only using an administrator account. Verify the vault is configured for RBAC before expecting this role to authorize data access.
Step 4: Add a secret and reference it from the application
Using an authorized secret-management account, open the vault’s Secrets section and create a dummy secret named payment-api-token for testing. In production, use an approved secure entry or rotation process for the real credential. Avoid entering actual values into a command that will be recorded in shell history, a pipeline log or a ticket.
In App Service, create an application setting named PAYMENT_API_TOKEN with a Key Vault reference rather than the literal credential. For example:
@Microsoft.KeyVault(SecretUri=https://your-unique-vault-name.vault.azure.net/secrets/payment-api-token/)
This is a versionless reference. App Service resolves it using its configured identity. If you use a user-assigned identity, configure the reference identity explicitly when required. The application reads the resolved setting through its normal configuration mechanism. That simplifies integration, but the secret still becomes available to the running application and must not be dumped into logs, diagnostics or error responses.
Microsoft’s App Service reference documentation explains network integration, identity selection and refresh behavior. The reference string is not an authentication credential itself; knowing the URI should not grant access.
Step 5: Test allowed and denied actions
Verify a harmless request to the payment sandbox succeeds. Confirm the application cannot create a secret or access the development vault if those actions are outside its design. Test network restrictions separately. Enable diagnostics and check that your audit pipeline records the expected identity and operations. Do not log the returned value as proof of success.
If the application uses the SDK rather than App Service references, it can call the vault explicitly. Here is an example for a Python process running on an Azure host that supports a system-assigned managed identity. It retrieves the dummy value but displays no secret. For a real application, use the value only where needed and implement controlled caching, exception handling and refresh.
import os
from azure.identity import ManagedIdentityCredential
from azure.keyvault.secrets import SecretClient
# Set KEY_VAULT_URL to the authorized vault endpoint.
credential = ManagedIdentityCredential()
client = SecretClient(vault_url=os.environ['KEY_VAULT_URL'],
credential=credential)
secret = client.get_secret('payment-api-token')
if not secret.value:
raise RuntimeError('Credential not available')
# Hand secret.value to the authorized API client, never to logs.
Install azure-identity and azure-keyvault-secrets in the application’s environment. The code is intentionally specific to managed identity and does not silently fall back to a developer’s powerful account in production. For local development, use a separately authorized development identity and vault, or follow Microsoft’s Python identity tutorial. This snippet has been syntax checked, not executed against Azure.
Designing access boundaries: an original blast-radius example
Centralizing secrets does not mean every app should use one shared vault. Imagine three services: Orders, Billing and Reporting, each with production and test deployments. Each deployment needs four distinct secrets. There are 24 secrets in the estate. If a single shared vault grants each application vault-wide Secrets User access, a compromised workload identity could potentially read all 24 values. This is a deliberately overprivileged baseline, not a claim that shared vaults always have that exposure.
| Design | Vaults | Secrets readable by compromised Orders production identity | Scope assumption |
|---|---|---|---|
| One shared vault | 1 | 24 | Vault-wide read grant |
| Separate production and test | 2 | 12 | Vault-wide read in production |
| Separate app and environment | 6 | 4 | Only Orders production vault grant |
The last design reduces the count of directly readable secrets from 24 to 4, or 83.3%. It does not prove an 83.3% reduction in attack probability or business loss. The four remaining secrets could be much more sensitive than the twenty excluded ones, and downstream access or inherited roles could increase impact. Verify actual grants and the privileges of the credential itself.
This simple metric is useful during architectural review: list each workload identity, count the secrets it can read directly, identify its cryptographic permissions, and map what each credential allows on the downstream system. Separating vaults by app, environment and, where appropriate, region is consistent with Microsoft’s security architecture guidance. More vaults introduce more policy, monitoring and networking configuration, so use infrastructure as code to maintain consistency.
An acceptance test matrix for the Orders deployment
Before go-live, ask the application owner and security reviewer to agree on expected outcomes and record actual results in the deployment environment. A deny test is just as important as a positive test.
| Test | Expected outcome | Evidence to retain |
|---|---|---|
| Orders production reads its own dummy secret | Allowed | Successful harmless operation and identity audit entry |
| Orders production reads Billing production secret | Denied | Authorization failure and assigned-scope review |
| Orders production sets or deletes a secret | Denied | Role/action check |
| Orders test reads Orders production secret | Denied | Separate identity and scope evidence |
| Valid Orders identity uses a disallowed network path | Denied, if network restriction applies | Network/DNS diagnosis and vault result |
| Approved operator creates a test secret version | Allowed | Change ticket and version identifier, not value |
| Application reads new version after controlled refresh | Allowed | Synthetic downstream test and version observation |
Execute only against authorized resources with dummy secrets. A failure in the desired deny cases is a release blocker, not an invitation to give the application a broader role.
For the complementary controls governing access and vault configuration, read our Azure RBAC vs Azure Policy guide.
Secret rotation: why setting a new value is not enough
Key Vault stores multiple versions under a secret name. Writing a new version does not automatically replace the password or token at the issuing service. If a database password changes at the database but the application uses the old vault value, the application can fail. If the new value is stored in Key Vault before the issuing service accepts it, the reverse can happen.
For a system that supports two simultaneously valid credentials, a planned rotation can avoid these failure windows. Keep credential A valid while creating credential B at the source. Publish B as a new vault version. Refresh the consumers and verify successful transactions using B. Only after verification, retire A at the issuing system. Maintain a rollback path while A is still valid. Where the provider supports only a single credential, coordinate the replacement with a maintenance or application-specific transition procedure. During a suspected compromise, containment may require immediate revocation rather than waiting for a normal overlap period.

An Event Grid event can trigger a Function or another authorized workflow to rotate a credential. The workflow must know how to issue or change the real credential, update Key Vault, handle partial failures and alert an operator. The dual-credential rotation tutorial illustrates this pattern. For cryptographic keys, Key Vault has key rotation policies; certificate renewal has its own policy and issuer constraints. These mechanisms are not interchangeable.
App Service refresh timing: a worked rotation window
App Service caches resolved Key Vault references and ordinarily refetches them every 24 hours according to Microsoft’s documentation. A version-pinned reference will not switch to a newly created version merely because a refresh happens. For versionless references, configuration changes cause a restart and immediate refetch, or administrators can invoke the authenticated reference-refresh API. Even then, verify that every running consumer has loaded the new value and that the target accepts it.
Consider a planned rotation at 09:00 on Monday. Suppose the last normal refresh is expected within 24 hours, the team requires another 2 hours for verification, and the credential provider permits both credentials to remain valid. A conservative planned overlap is 26 hours, ending no earlier than 11:00 Tuesday. This is a scheduling example, not a guarantee of successful refresh: if any verification fails, pause revocation unless incident containment requires otherwise. An explicit refresh and successful verification can shorten the overlap. Simply assuming a five-minute cache duration when using App Service references would be unsafe.
For cryptographic keys, retain older versions as long as required to decrypt existing data or verify older signatures. A new key version does not necessarily re-encrypt historic ciphertext. Record key identifiers with encrypted data where your architecture requires them, and follow each integrated Azure service’s specific rotation behavior.
Encryption and customer-managed keys
The vault is a place to govern keys, not the place to send every document for encryption. Many systems use envelope encryption: a data encryption key protects the bulk payload, while a key encryption key protects or wraps the smaller data key. The storage service or application keeps the encrypted data and wrapped data key. The protected key in the vault can be used to unwrap the data key when authorization permits.
This arrangement keeps key governance separate from payload storage and reduces calls to the vault. It does not prevent authorized software from decrypting the data, so application-level permissions remain essential. Use established libraries and supported Azure service integrations rather than designing a custom cryptographic protocol.
Azure Storage, for instance, supports customer-managed keys for server-side encryption. The storage service’s identity needs appropriate permissions to use the configured key, and the vault must meet the service’s recovery protection requirements. Disabling a key or revoking the identity’s permissions without coordination can make data inaccessible. See the Azure Storage configuration guide. Customer-managed keys increase control, but also introduce operational responsibility that may not be necessary for every workload.
How much does Azure Key Vault cost?
Azure Key Vault is not an unlimited free service. Standard and Premium vaults meter requests; software and hardware key operations can have different rates depending on the key type. Certificate renewal requests and automated key rotation have separate pricing dimensions. Premium actively used HSM key versions can incur additional monthly charges. Managed HSM pools use a different, hourly capacity-based model. A certificate authority can charge separately for issuing a certificate; Key Vault is not itself the public CA.
Microsoft’s Key Vault pricing page describes the billing meters. Its regional numerical rate fields did not render in our review on December 3, 2026. Therefore, the following USD prices are hypothetical planning inputs, not verified current Azure retail prices. Use your region, agreement and currency in the Azure Pricing Calculator to replace them. See also our Azure pricing guide for complete workload budgeting.
| Cost component | Estimate formula |
|---|---|
| Secret requests | Number of billable operations ÷ 10,000 × applicable rate |
| Key operations | Sum separately for each operation/key-type pricing meter |
| Premium active HSM keys | Billable active key versions × applicable monthly rate or tier |
| Certificate renewals | Renewal requests × applicable renewal rate |
| Key rotation | Billable scheduled rotations × applicable rate |
| Managed HSM | Provisioned pool hours × applicable hourly rate |
| Related infrastructure | Private endpoint, traffic, log ingestion, alerting, rotation automation and other applicable charges |
Billing for an HSM-protected key version depends on its use within the relevant 30-day billing period. Rotating a key and continuing to use an older version can result in two active billable versions. Read the actual meter definitions before comparing a Premium vault with a Managed HSM pool. Do not apply an illustrative secret GET price to every other operation.
Original model: caching versus retrieving a secret on every request
Suppose a web application receives an average of 50 requests each second, runs continuously for 30 days and has ten replicas. Every request needs the same external API credential. Compare retrieving the secret on every request with having each replica refresh an in-memory copy every five minutes or every hour. Assume one successful billable GET for each retrieval, no extra startup calls, no failures and a hypothetical rate of $0.03 per 10,000 GET operations. This is an SDK caching design example, not the App Service reference refresh mechanism.
| Approach | Monthly secret GET operations | Illustrative GET-only cost |
|---|---|---|
| Every incoming request | 129,600,000 | $388.80 |
| Ten replicas, refresh every 5 minutes | 86,400 | $0.26 |
| Ten replicas, refresh every hour | 7,200 | $0.02 |
Calculation: 30 × 24 × 60 × 60 = 2,592,000 seconds. The per-request approach makes 50 × 2,592,000 calls. The five-minute refresh approach makes 10 × 30 × 24 × 12 calls. The hourly approach makes 10 × 30 × 24 calls. Multiplying each by $0.03 / 10,000 produces the unrounded estimates. Five-minute caching reduces modeled requests by approximately 99.93%, but the proper refresh period depends on the credential’s risk, validity and rotation requirements.

Do not blindly extend the cache duration to minimize cost. Keep secrets in process memory only as long as justified, refresh on planned rotation, prevent sensitive crash dumps and avoid distributing cached secrets to unrelated processes. If a credential is revoked, the downstream service must reject it even when a client still holds the old value. A vault permission revocation alone does not invalidate a copy that has already been retrieved. Decide how the application will handle a transient vault failure versus confirmed credential revocation. Avoid indefinite stale-secret fallback.
Burst traffic and service limits
Monthly cost is not the only scaling constraint. As documented on November 17, 2026, standard vaults have a limit of 4,000 transactions in ten seconds for the relevant other-secret transaction category, per vault per region. Different key algorithms and operations have separate weighted limits, and subscription-wide limits apply. See service limits and throttling guidance.
Imagine 1,500 replicas start simultaneously and each retrieves four secrets in the same ten-second interval. That is 6,000 GETs, exceeding the 4,000 threshold by 2,000 before other workload traffic. Even though the monthly bill could be modest, the rollout can encounter throttling. If you deliberately stage startups to target no more than 70% of that published limit, the modeled allowance is 2,800 GETs per ten seconds, or at most 700 four-secret startup bundles per interval with no other demand. This is a planning ceiling, not a guaranteed throughput figure.
Use bounded exponential backoff with jitter, stagger deployment waves, reuse clients, and consider a vault boundary aligned with application ownership and capacity needs. Do not synchronize every replica’s refresh at the same timestamp. Monitor throttling and latency during load tests. Splitting vaults cannot bypass subscription limits or compensate for poor architecture.
Networking, monitoring and recovery
Key Vault access requires more than permissions. A public endpoint protected by identity is not the same as a private endpoint. Network controls provide an independent layer and can restrict where valid credentials can be used from. For sensitive production workloads, evaluate a private endpoint and disable public access after verifying private connectivity. The public vault hostname normally resolves through the private DNS configuration to the private IP for clients on the approved network. Configure the correct private DNS zone (for public Azure, privatelink.vaultcore.azure.net) and verify resolution from the actual app environment. A private endpoint does not grant data-plane access and cannot replace RBAC.
For supported firewall configurations, use selected network access or approved IP ranges. Do not assume a checkbox allowing trusted Azure services includes your application. Conversely, trusted-service exceptions can continue to apply even with public network access disabled; review the bypass setting and any Network Security Perimeter rules rather than assuming that disabling public access eliminates every exception. Use Microsoft’s network security guidance and validate the exact service integration. A pipeline hosted outside your private network may require an authorized private-network-connected agent or a different secure deployment design.
Soft delete, purge protection and backup
| Control | Protects against | Limitation |
|---|---|---|
| Soft delete | Accidental deletion of a vault or object | Recovery available only within retention window |
| Purge protection | Premature irreversible deletion | Cannot be disabled after enablement; may prevent immediate reuse of a deleted name |
| Backup and restore | Recovery of backed-up individual objects | Azure subscription/geography and version-count restrictions apply |
| Redundancy | Service infrastructure failures | Does not reverse an authorized bad configuration or credential revocation |
Soft-delete retention can be configured between 7 and 90 days when creating the vault. Purge protection prevents even privileged operators from permanently deleting protected items during that period. It is particularly important for keys that protect persistent data. A recovered vault may also require restoration of associated role assignments and integrations; maintain configuration in a reviewed infrastructure definition and verify consumers after recovery. Microsoft’s recovery documentation and backup constraints should inform your recovery runbook. Test recovery in a nonproduction vault, never by deleting a critical production encryption key.
Audit logs and meaningful alerts
Configure diagnostic settings to route audit logs to an appropriate destination, such as a Log Analytics workspace or protected storage. Monitor unusual credential reads, repeated access failures, changes to authorization, deletion or purge actions, near-expiry events and throttling. Monitor control-plane changes through Azure Activity Log as well as vault data-plane activity. Configure access to logs so that the person being audited cannot simply erase evidence. Defender for Key Vault can add threat detection when enabled, with applicable charges.
Define normal access patterns before alerting on anomalies. A scheduled job reading one secret every hour is different from an application that reads thousands of secrets in a short window. Correlate events with known deployments and rotation tickets. Log metadata and outcomes, not secret values, credentials or access tokens. See Microsoft’s monitoring guidance.
For threat detection around vault access and the wider cloud security posture, see our Microsoft Defender for Cloud guide.
Troubleshooting Azure Key Vault access problems
The most efficient diagnostic order is identity, authorization, network, object version, then capacity or downstream credentials. A 403 is not always a role problem, and a successful vault response is not proof that the payment API accepted the value.
| Symptom | First check | Corrective approach |
|---|---|---|
| 401 unauthorized | Token audience, tenant, identity availability | Obtain a valid token through the intended identity; inspect sanitized errors |
| 403 permission denied | Identity object ID, role, scope, access model | Correct narrowly scoped permissions and allow propagation |
| 403 firewall error or connection timeout | Network policy, DNS, endpoint route | Fix the authorized connection path; do not indiscriminately enable public access |
| 404 secret not found | Name, vault, version and deletion state | Verify identifier and intended version; recover only through approved process |
| 429 too many requests | Service-specific throttling limits and bursts | Backoff with jitter, cache and stagger refresh/startups |
| App setting contains literal Key Vault reference | Reference resolution, identity, network | Use the App Service reference diagnostics and verify access |
| Vault GET succeeds but target rejects credential | Issuer validity, version, application refresh | Coordinate credential rotation and test against target |
Start from Microsoft’s REST error guidance and compare the precise error details. Avoid copying full request headers or secrets into shared tickets. Test using a dummy object with equivalent authorization, not production credentials. If an incident may involve exposure, revoke or rotate affected downstream credentials, investigate access logs and preserve evidence according to your incident response procedure.
Where Azure Key Vault fits in the wider Azure ecosystem
App Service and Functions can resolve references to vault secrets. AKS can integrate with the Secrets Store CSI Driver and workload identity; understand whether your chosen configuration mounts values or also synchronizes them into Kubernetes Secrets, which creates an additional storage boundary. Azure DevOps can retrieve vault values into pipelines, but the agent and task execution environment can then become part of the sensitive-data boundary. A secret stored centrally is no longer protected by the vault alone once a pipeline or application retrieves it. Prefer workload federation for authenticating pipelines where supported, and keep build-time and runtime identities separate.
Key Vault and App Configuration serve complementary roles: general configuration belongs in App Configuration while sensitive material belongs in Key Vault. References can connect them without making App Configuration the primary store for secret values. For multicloud systems, evaluate whether a provider-native vault meets your identity and lifecycle requirements, or whether a cross-platform system such as HashiCorp Vault is warranted. The latter can support additional workflows but brings its own infrastructure, availability and operational considerations. See HashiCorp’s CI/CD security guidance for an example of these distinct trust boundaries.
A production-readiness worksheet
Before granting production access, record a concrete answer to each question below. The worksheet is designed to be copied into a design or change approval ticket. A missing answer should be treated as a risk requiring an owner and remediation, not automatically accepted.
| Control question | Evidence or decision required |
|---|---|
| Can the credential be eliminated? | Managed identity or federation feasibility |
| What kind of vault object is needed? | Secret, key, certificate or ordinary configuration |
| Which workload may access it? | Principal object ID, scope, required actions |
| Which network path is permitted? | Endpoint, DNS and actual workload connectivity test |
| What is the worst direct access scope? | Readable secret count plus downstream privileges |
| How is rotation coordinated? | Issuer, overlap, version, refresh and revocation procedure |
| How is deletion prevented or recovered? | Retention, purge protection, backup and recovery test |
| What happens during a vault outage? | Bounded retries, cache policy, alerting and fail-safe behavior |
| What drives monthly costs? | Separate meter estimates, peak requests and supporting costs |
| What proves controls work? | Positive and negative acceptance tests with sanitized evidence |
Frequently asked questions
Is Azure Key Vault the same as Microsoft Entra ID?
No. Entra ID provides identities and authentication. Key Vault safeguards sensitive assets and controls access to their permitted operations. A managed identity can authenticate to Key Vault through Entra without a long-lived bootstrap password.
Is Azure Key Vault a password manager?
It is a service for application and infrastructure credentials, not a consumer password manager with browser autofill and personal account organization. A workload should retrieve only the secrets it needs.
Is Azure Key Vault free?
Do not assume unlimited free usage. Ordinary vaults bill metered operations and applicable lifecycle charges; hardware-backed key versions and Managed HSM pools introduce other billing dimensions. Verify trial credits, free offers and regional pricing separately.
Can a Key Vault secret be read in plaintext?
Yes, by a properly authorized caller. Encryption at rest protects storage, not against every authorized read. A private cryptographic key stored as a key object has different handling. Protect applications, pipelines and diagnostic output that receive secret values.
Does Key Vault automatically rotate every secret?
No. General secret rotation requires a workflow that changes the credential at its issuer and coordinates consumer refresh. Key rotation policies and supported certificate renewal have different mechanisms. An expiration attribute alone is not a complete rotation workflow.
Can applications outside Azure access Key Vault?
Yes, provided they use a supported authorized identity, valid network path and appropriate permissions. Prefer supported federation or another secure authentication mechanism rather than distributing permanent credentials to access the vault.
Is Premium required for private endpoints?
No. Private connectivity and the cryptographic tier address different requirements. Evaluate Standard first if your only requirement is private access to application secrets, and confirm the applicable networking configuration and costs.
What happens if I delete the encryption key?
A service relying on it may lose the ability to decrypt data or continue operating. Recovery depends on the key’s state, recovery protections, backup and the service integration. Do not disable or delete customer-managed encryption keys without an approved impact assessment and recovery plan.
The bottom line
Azure Key Vault is most valuable when it forms part of a deliberate identity and cryptographic architecture. Remove credentials wherever token-based authentication can replace them. Store the remaining secrets in narrowly scoped vaults, use the proper key or certificate object for cryptographic operations, test both allowed and denied access, and coordinate credential lifecycles with the services that issue and consume them. Measure request volume and operational impact, not merely the number of stored secrets. A well-designed vault should make the secure path the easiest path for the application while leaving administrators with clear audit evidence and tested recovery procedures.
Recent articles
Our editorial approach
Clear explanations, practical guidance and responsible research.





