Secure secrets and keys by using Azure Key Vault
Five decisions behind every Key Vault design
A production connection string parked in an App Service application setting is one copy-paste away from a source-control commit and one screenshot away from a support ticket. Move that value into Azure Key Vault and the application stops carrying it at all: at startup it presents an identity of its own and asks the vault for the current value (Key Vault overview[1]). Everything else on this page follows from that move, because once a value lives in a vault you own decisions about who may read it, from where, how it ages, and what tells you somebody tried.
The previous page in this domain covers the caller: Privileged Identity Management, conditional access, authentication methods, and the managed identity an Azure resource uses to prove who it is. This page covers the vault on the other side of that call. The governance page that follows describes the controls sitting above any single resource, such as Azure Policy definitions, resource locks, and role assignments across a subscription.
The three object types
A vault stores three kinds of object, and they differ in permission and in lifecycle, so the distinction is worth pinning down before anything else. A key is cryptographic key material that the vault uses on your behalf for operations such as wrap, unwrap, and sign, so the private material stays inside the service. Wrapping is worth naming here because a later section reasons about it: it means encrypting another key rather than data, and the key being wrapped is what that section calls a data encryption key. A secret is any value you hand the vault to store and read back later, typically a password, a connection string, or an API key. A certificate is a managed X.509 certificate that the vault builds from a certificate policy, and the vault also exposes that certificate's key material as a key and its exportable form as a secret of the same name (keys, secrets, and certificates[2]).
Two things stay out of a vault. Customer content belongs in a data service such as Azure Storage or Azure Cosmos DB, and ordinary non-sensitive configuration belongs in a configuration store. A vault is a small, heavily governed store rather than a general-purpose one, and its transaction limits are sized accordingly (Key Vault service limits[3]).
Five decisions, in the order this page takes them
Putting an object in a vault raises five decisions, and the figure below names each one with the question it answers: the vault boundary (which vault holds this material, and what survives a delete), authorization (which plane, which role, at which scope), network reach (from where a data-plane call may arrive), object lifecycle (what creates the next version), and detection (what signals that an attempt went wrong). Those five names are used unchanged for the rest of the page.
Read that order as a dependency rather than a list. The boundary decision constrains every decision after it, because role assignments, firewall rules, diagnostic settings, and alerts all attach to a vault and not to an individual secret. Draw the boundary carelessly and no later control undoes it.
Vault boundaries and what survives a delete
One vault per application per environment, with roles assigned at the vault scope, is the shape Microsoft recommends (Azure RBAC for Key Vault[4]). The reason is mechanical: several controls attach to the vault, so a firewall rule, a diagnostic setting, and a Defender alert are scoped to the vault, and two applications sharing one vault share those decisions. Development, test, and production get separate vaults for the same reason, as do separate regions when their security boundaries differ, and a multitenant service selects its vault model according to the level of isolation it needs.
Naming is not isolating. A shared vault whose secrets are told apart only by a name prefix, prod-sql-conn beside dev-sql-conn, still hands both values to every holder of a vault-scoped role, because the role is scoped to the vault and nothing in the name changes that.
Deleting, then destroying
Removing vault content permanently takes two operations rather than one (Key Vault soft delete[5]). The first, delete, moves the vault or object into a deleted state where it is still recoverable. The second, purge, permanently removes it. Soft delete is on by default when you create a vault and cannot be turned off once enabled; the retention period is chosen at creation, anywhere from 7 to 90 days, defaults to 90, and cannot be changed afterwards. The same interval governs both soft delete and purge protection. While an object or vault sits in the deleted state its name cannot be reused in that location, which is why a redeploy under the old name fails until retention expires or the old object is purged.
Purging is deliberately privileged: in general only the subscription owner or a principal holding the Key Vault Purge Operator role can do it. Purge protection is the step beyond that. It is off by default, requires soft delete to be on, and blocks the purge outright until the retention period passes. It is also a one-way door: on the ARM resource, enablePurgeProtection "does not accept false as its value" once enabled (Microsoft.KeyVault/vaults reference[6]). Most Azure services that encrypt data with a customer-managed key held in Key Vault require purge protection, because purging that key destroys the data it protects. The figure below traces one object from active through the deleted state to recovery, to a purge, or to a purge the protection blocks.
Two neighbouring controls get mistaken for this one. A resource lock stops a delete operation from succeeding; it restores nothing afterwards, so it is a prevention control and never a recovery mechanism. Key Vault backup is a genuinely separate control: it exports an individual key, secret, or certificate so it can be restored into a key vault in the same subscription and Azure geography (Key Vault backup[7]). Use it for objects that cannot be recreated from another source, and restore a test copy occasionally, because an untested restore is a hope rather than a control.
One consequence catches teams out during a recovery exercise. When a key vault is soft-deleted, the services integrated with it are deleted as well, including its Azure RBAC role assignments and its Event Grid subscriptions, and recovering the vault does not restore them. They have to be recreated by hand after the recovery.
So the boundary decides who is affected by an incident, and the deletion settings decide whether the incident is survivable. Both are set at vault creation and are awkward or impossible to change later, which is what makes them design decisions rather than operational ones.
Control plane, data plane, and the roles between
Key Vault Contributor lets a person create vaults, tag them, and configure their networking, and gives that person no way to read a single secret. That is not a quirk of one role definition. Key Vault exposes two interfaces whose access controls work independently (Key Vault access model[4]). The control plane, reached at management.azure.com, creates, reads, updates, and deletes vaults and sets their properties. The data plane, reached at the vault's own <vault-name>.vault.azure.net endpoint, performs operations on keys, secrets, and certificates. Both planes authenticate the caller with Microsoft Entra ID, and Microsoft states directly that Key Vault Contributor "is for control plane operations only ... It does not allow access to keys, secrets and certificates". The request path through both planes is drawn in the network section below, where the third gate is this same data-plane authorization.
The gap runs the other way too, and that direction is the dangerous one. On a vault still using legacy access policies, a principal holding control-plane Contributor "can grant themselves access to the data plane by setting a Key Vault access policy". Control-plane rights on such a vault are therefore data-plane rights one short step removed, which is the reason to control those control-plane roles tightly and to prefer the RBAC model described next.
One authorization model at a time
A vault runs exactly one data-plane authorization model, selected by its enableRbacAuthorization property: Azure RBAC (role-based access control), or the legacy vault access policies. Whichever model is not selected is ignored, so adding an access policy to an RBAC vault changes nothing and repairs nothing, and this is the single most common wrong answer in Key Vault access questions. Starting with API version 2026-02-01, Azure RBAC is the default model for newly created vaults; existing vaults keep the model they already have (Key Vault access control default[8]). Switching an existing vault to the RBAC model invalidates all of its access-policy permissions, so the equivalent role assignments must be in place before the switch or callers start failing.
Pick the role by object type
These are the built-in roles you meet most often, among others in the full list. Each one is a data-plane role except the last, and each works only on a vault using the Azure RBAC permission model.
| Role | What it grants | Typical holder |
|---|---|---|
| Key Vault Secrets User | Read secret contents, including the secret portion of a certificate with its private key | An application's managed identity |
| Key Vault Secrets Officer | Any action on secrets except managing permissions | A rotation function that writes new versions |
| Key Vault Crypto User | Perform cryptographic operations using keys | A workload that wraps and unwraps data encryption keys |
| Key Vault Crypto Officer | Any action on keys except managing permissions | An operator who sets rotation policies |
| Key Vault Certificates Officer | Any action on certificates except managing permissions | A certificate administrator |
| Key Vault Administrator | All data-plane operations on the vault and every object in it, but no management of the vault resource or of role assignments | A break-glass operator |
| Key Vault Reader | Read metadata of the vault and its objects, never a secret value or key material | An auditor |
| Key Vault Purge Operator | Permanently delete soft-deleted vaults | A cleanup process, rarely a standing assignment |
| Key Vault Contributor | Control plane only: create and configure vaults, with no access to keys, secrets, or certificates | A platform team |
Roles can be assigned at management group, subscription, resource group, vault, or individual object scope. Vault scope is the working default, and Microsoft answers the isolation question directly in the RBAC guide's FAQ: object-scope assignments are not a way to give application teams their own slice of a shared vault, because "any administrative operations like network access control, monitoring, and objects management require vault level permissions". Object scope exists for the narrow cases the same guide names, such as one user reading their own SSH private key, or one secret deliberately shared between two applications.
The workload's own identity
An Azure workload should reach a vault as a managed identity, an identity that Azure creates for the resource and whose credentials Azure manages, so nothing has to store a password or certificate (managed identities for Azure resources[9]). Two conditions have to hold and they are independent: the identity must be enabled on the resource, and that identity must hold a data-plane role assignment on the vault. Being inside the right virtual network, or reaching the vault through a private endpoint, satisfies neither condition, because network position is not an identity.
Role changes are not instant from a running workload's point of view. Azure caches managed identity tokens, so a change to the identity's group or role membership can take several hours to be reflected in what a long-lived process can do (managed identities FAQ[10]). Treat a role change like a deployment with a propagation window, not like a switch that flips.
The takeaway is a habit: for any Key Vault access question, name the plane first, then the model, then the role, then the scope. A wrong answer usually sits at exactly one of those four steps.
Network reach: firewall rules and Private Link
A vault created with the default network settings accepts requests from any network, and that is not the same as accepting operations from anyone. Microsoft puts it plainly: with the Key Vault firewall disabled, all applications and Azure services can send requests, and the vault "still restricts access to secrets, keys, and certificates stored in key vault by requiring Microsoft Entra authentication and access policy permissions" (configure network security for Key Vault[11]). Read that last phrase through whichever model the vault runs, since it runs only one: on an RBAC vault the equivalent gate is the data-plane role assignment from the previous section, not an access policy. Network reach and authorization are gates in series, three of them once authentication and the role check are counted apart. The figure below walks one data-plane request through all three: the vault's network rules admit the source, Microsoft Entra ID authenticates the caller, and the data-plane role assignment permits the operation. Failing any single gate refuses the request.
One contrast is worth making before the mechanics, because the sibling page on Azure network services teaches a different evaluation model with the same vocabulary. A network security group evaluates rules in priority order and stops at the first match. The Key Vault firewall does not: when it is enabled with the default action set to Deny, it is an allowlist, so a source that matches no rule is denied without any ordering to reason about.
Three configurations, then two exceptions
The three configurations are alternatives on one axis, so pick one; the two exceptions layer on top of the choice.
All networks is the default. The firewall is disabled and any client that can reach the public endpoint may send a request, which is acceptable only while both other gates are tight.
Selected networks lists the sources allowed to reach the public endpoint and sets the default action to Deny. Two rule kinds exist. An IP rule takes an IPv4 address or CIDR range, which must be public: RFC 1918 private ranges are rejected and only IPv4 is supported at this time. A virtual network rule takes a subnet, and it works only when the Microsoft.KeyVault service endpoint is enabled on that subnet, so a network security group rule that permits outbound HTTPS does nothing to place the subnet on the vault's allowlist. Capacity is a maximum of 200 virtual network rules and 1,000 IPv4 rules per vault.
Public access disabled leaves private endpoints as the only way in. Create the private endpoint, integrate name resolution with the privatelink.vaultcore.azure.net private DNS zone, and then set public network access to Disabled (integrate Key Vault with Azure Private Link[12]). Creating the private endpoint does not close the public endpoint by itself; disabling public access is the separate setting that does. The vault's public DNS name keeps resolving afterwards, by design, because that is how the Private Link DNS overlay works for every Azure PaaS service, and the public ingress it resolves to refuses every request.
The first exception is the trusted Microsoft services bypass. It admits only the services on the documented trusted-services list, and services absent from that table are blocked whether or not the bypass is enabled; Azure DevOps is the example Microsoft names, because customers can run their own code there (virtual network service endpoints for Key Vault[13]). The bypass keeps applying when public network access is set to Disabled, so a trusted service does not need a private endpoint to reach the vault.
The second exception is a Network Security Perimeter, a logical isolation boundary around PaaS resources deployed outside your virtual networks (Network Security Perimeter[14]). Private endpoint traffic is not subject to perimeter rules; all other traffic, trusted services included, is. Two settings are in play here and they are easy to confuse. The first is the perimeter's own access mode: in Transition mode the vault's publicNetworkAccess setting still controls public access and the perimeter only logs what it would have denied, while in Enforced mode the perimeter rules override that setting. The second is that same publicNetworkAccess setting on the vault, and Secure by perimeter is the value of it that turns the trusted-services bypass off, forbidding trusted services even when the bypass is configured.
Allowing one subnet through the firewall
The order matters more than the syntax here, because the service endpoint is a property of the subnet and the rule is a property of the vault.
# 1. Put the Key Vault service endpoint on the subnet. The vault firewall can
# recognise a subnet only when this endpoint is present.
az network vnet subnet update --resource-group "myresourcegroup" \
--vnet-name "myvnet" --name "mysubnet" --service-endpoints "Microsoft.KeyVault"
# 2. Add that subnet as a virtual network rule on the vault.
subnetid=$(az network vnet subnet show --resource-group "myresourcegroup" \
--vnet-name "myvnet" --name "mysubnet" --query id --output tsv)
az keyvault network-rule add --resource-group "myresourcegroup" \
--name "mykeyvault" --subnet $subnetid
# 3. Deny whatever the rules do not admit. Until this runs the firewall is
# still open. (IP-range rules and the trusted-services bypass omitted: ...)
az keyvault update --resource-group "myresourcegroup" --name "mykeyvault" \
--default-action Deny
Step 3 is the one that gets skipped. Adding rules while the default action stays at Allow documents an intention without enforcing anything, so --default-action Deny is what turns the list into a firewall.
Two boundaries on all of this. Key Vault firewall rules apply to data-plane operations only, so control-plane calls through Azure Resource Manager are not filtered by them, including secrets deployed through an ARM template, which reach management.azure.com rather than the vault's data-plane endpoint. And once rules are in effect they apply to humans as well: a user can still browse to the vault in the Azure portal, but listing keys, secrets, or certificates fails when their client machine is not on the allowlist, which is a support ticket waiting to happen unless the operations team's addresses are allowed too.
Rotating keys, secrets, and certificates
Key Vault never overwrites material. Every write creates a new version, and an object identifier either names a version or omits it; omitting the version segment gives the base identifier, and Microsoft describes retrieval that way as getting "the latest version of the object" (keys, secrets, and certificates[2]). That is the mechanism under every rotation story here: rotation adds a version, and consumers either follow the versionless identifier or pin a version deliberately.
The three object types automate the next version differently, and the figure below sets the three paths side by side.
Keys
A rotation policy on a key generates a new version automatically at a configured interval, with a documented minimum of seven days, and can raise a near-expiry notification through Event Grid; rotation on demand is available alongside the schedule (configure key autorotation[15]). Azure services that encrypt with a customer-managed key use the newest version for new operations while keeping access to earlier versions for data already protected (autorotation in Key Vault[16]). Deleting old versions immediately after a rotation is therefore a data-loss event dressed up as tidiness.
Rotating a key re-encrypts nothing on its own. The new version is new wrapping material, so the service holding the protected data has to rewrap its data encryption keys with it, and until that finishes the previous version is still required to unwrap what it protected. Keep the old version enabled until the dependent service reports the rewrap complete, then retire it.
Certificates
A Key Vault certificate carries a certificate policy holding the issuer, the validity period, the key properties, and the lifetime actions that decide when renewal happens (about Key Vault certificates[17]). Renewal is automatic for certificates issued by an integrated certificate authority and for self-signed certificates, and it fires at a configured percentage of the lifetime or a set number of days before expiry (certificate autorotation[16]). A renewal produces a new version with a new identifier, exactly as a key rotation does.
This is also why a PFX file uploaded as a generic secret is unmanaged. The lifecycle belongs to the certificate object and its policy; a secret that happens to contain certificate bytes has no policy for Key Vault to act on, so nothing renews it.
Secrets
Secrets have no built-in generator, because Key Vault cannot know how to change a password in your database. The supported pattern is event-driven: a near-expiry Event Grid event triggers a function that mints the new credential at the source system and writes the new secret version (rotate a secret with a single credential set[18]). Microsoft documents two shapes of this, one for resources with a single set of credentials and one for resources with two sets, where the second set lets the new credential be created and tested before the old one is retired.
Expiration metadata needs care, because it does not do what its name suggests. The exp (expires on) and nbf (not before) attributes on a secret are "for informational purposes only", and a get operation works for a not-yet-valid or expired secret (about Key Vault secrets[19]). The attribute that actually stops retrieval is enabled, so revoking a leaked secret means disabling that version, not back-dating its expiry. The safe order is to write the new version, update or restart the consumers, and only then disable the old version, because reversing those steps is an outage.
Being told about it
Key Vault publishes lifecycle changes through Event Grid as ten event types, all prefixed Microsoft.KeyVault: new-version-created, near-expiry, and expired for each of secrets, keys, and certificates, plus VaultAccessPolicyChanged (Key Vault as an Event Grid source[20]). Near-expiry fires 30 days before expiration by default, and for keys the notification time is configurable in the rotation policy. Two conditions gate everything here: notifications trigger only on new versions of an object, and you must first subscribe to the event on the vault. An event subscription that was never created is the reason a rotation function silently never runs.
The line to carry into the exam is that rotation is per object type. Keys rotate themselves on a policy, certificates renew themselves from a policy, and secrets rotate only because you wrote something that rotates them.
Detecting exposed secrets and vault threats
Two different exposures need two different products, and questions in this area usually turn on telling them apart. Microsoft Defender for Key Vault watches the calls arriving at a vault. Defender CSPM (cloud security posture management) looks for the credentials that never reached a vault at all, sitting in plaintext on a disk, in a deployment template, or in a repository. The figure below splits the two by where the credential sits, and names the scanning surface each one covers.
Defender for Key Vault sees the vault
Defender for Key Vault "detects unusual and potentially harmful attempts to access or exploit Key Vault accounts" and raises alerts, optionally emailing them (Microsoft Defender for Key Vault[21]). The alerts appear on the key vault's own Security page, in Workload protections, and on the Defender for Cloud security alerts page. It is a detection control end to end: the alert describes activity that already happened and no request is blocked, so the firewall and the role assignments described earlier remain the only preventive controls.
An alert carries the object ID and the user principal name or IP address of the suspicious caller, and some of those fields are absent depending on how the vault was accessed. An application has no user principal name, and traffic originating outside Azure has no object ID. Microsoft's caution is worth repeating because it inverts the usual instinct: do not dismiss an alert merely because you recognise the user or the application, since the feature exists to catch credentials that were stolen from exactly those familiar identities.
Responding runs in a fixed order. Establish whether the traffic came from inside your tenant, and if the source cannot be identified, tighten reach by enabling the vault firewall and restricting or removing the principal. Then measure the impact from the alert's list of accessed objects and timestamps, corroborated with the vault's audit logs if diagnostic settings were on. Finally rotate every secret, key, and certificate the suspicious caller touched, and have the application owner audit for uses of the compromised credential.
Defender CSPM finds the copies outside the vault
Secrets scanning in Defender for Cloud comes in three types, all agentless (protecting secrets in Defender for Cloud[22]). Machine scanning finds exposed credentials on multicloud virtual machine disks and is available with either the Defender CSPM plan or Defender for Servers Plan 2. Cloud deployment resource scanning covers multicloud infrastructure-as-code deployment resources, and code repository scanning covers connected Azure DevOps repositories; both of those require the Defender CSPM plan. Supported findings include insecure SSH private keys, plaintext SQL, PostgreSQL, and MySQL connection strings, storage account connection strings and SAS tokens, AWS access keys, and Microsoft Entra client secrets, among many more types listed on that page.
Findings arrive through four review surfaces rather than one: the asset inventory shows the secrets discovered on a specific machine, a recommendation is triggered under the Remediate vulnerabilities security control, cloud security explorer[23] queries the cloud security graph for secrets insights, and attack path analysis[24] shows which exploitable path an attacker could walk from that credential to a high-impact asset. The last one is what turns a list of findings into a priority order.
Remediation is not deletion. Deleting the file that held a plaintext credential removes the finding and leaves the credential valid wherever it is accepted, so the fix is to rotate it at its source and then move the value into a vault.
Three channels, three jobs
Detection is not one feed. Key Vault audit logging, enabled through diagnostic settings, records which caller performed which operation on the vault, and it is the only channel that answers that question after the fact (Key Vault logging[25]). Log alerts built on that data catch security-relevant patterns such as repeated authorization failures or a secret deletion. Event Grid notifications carry lifecycle changes such as a new version or a near expiry. They do not substitute for one another: a lifecycle event is not an audit record, and a Defender alert is not a log.
Exam-pattern recognition
Key Vault questions on this exam are rarely about what a feature does. They are about which of two plausible controls the scenario actually calls for, and the discriminator is usually one sentence in the stem. These are the recurring shapes.
The application is in the right network and still fails
The stem gives a private endpoint, an application in the connected virtual network, and a failing secret retrieval. The fix is a data-plane role assignment for the workload's managed identity, not another network change, because reachability and authorization are separate gates. Read the failure mode: something the network refused never authenticated, while an authorization failure names the caller in the audit log.
An access policy appears among the options
If the vault uses the Azure RBAC permission model, an access policy on it is ignored, so any option that adds, edits, or repairs one is wrong by construction. When the stem says the permission model was just switched to RBAC and callers broke, the fix is to create the equivalent role assignments, because switching invalidates all previous access-policy permissions.
"Even administrators must not be able to delete it"
That wording asks for purge protection on top of soft delete. Soft delete alone still allows an authorized principal to purge, and a resource lock blocks a delete without providing any recovery. If the requirement instead says a deleted secret must be recoverable for a set number of days, the answer is the retention period, chosen at vault creation between 7 and 90 days.
A subnet, a network security group, and a vault
A virtual network rule works only with the Microsoft.KeyVault service endpoint enabled on the subnet, so an option that adds only an outbound HTTPS rule to the network security group is a distractor. When the client is instead a fixed public address, the answer is an IPv4 address or CIDR rule under selected networks with the default action set to Deny. When a Microsoft service needs access, check the trusted-services list before choosing the bypass, since Azure DevOps and anything else off that list stays blocked.
Rotation stems name the object type
A database password rotates through an Event Grid near-expiry event and a function that writes the new secret version, never through a key rotation policy. A customer-managed key rotates through a rotation policy, and the follow-up requirement is usually that the dependent service rewraps its data encryption keys while the old version stays enabled. A certificate that must renew itself has to be stored as a certificate object with a policy using an integrated certificate authority or self-signed certificate regeneration; a PFX stored as a generic secret cannot renew.
Defender stems split by where the credential lives
An alert about unusual or suspicious vault access is Defender for Key Vault, and the correct response rotates what was accessed rather than expecting the product to have blocked anything. Plaintext credentials discovered on virtual machine disks across Azure, AWS, and GCP are agentless machine secrets scanning, which needs Defender CSPM or Defender for Servers Plan 2; credentials in deployment templates or in a connected repository need Defender CSPM specifically. If an option offers Defender for Key Vault as the way to find secrets committed to a repository, it is inspecting the wrong surface.
Two options both look correct
When one option changes reach and the other changes permission, the requirement decides. Wording about who may use the material points at a role assignment; wording about where a call may originate points at the firewall, a service endpoint, or a private endpoint; and wording about what must be noticed points at Defender or at diagnostic settings. Naming the layer first, then the control, is faster than comparing the four options against each other.
What each Key Vault network configuration admits
| Behavior | All networks (firewall disabled, the default) | Selected networks | Public access disabled |
|---|---|---|---|
| Data-plane callers admitted | Any client that reaches the public endpoint | Allowed public IPv4 addresses or CIDR ranges, and subnets carrying the Microsoft.KeyVault service endpoint | Private endpoint connections only |
| Default action for unmatched traffic | Allow | Deny | Deny |
| Extra prerequisite | None | Service endpoint on each allowed subnet; a static public address for an IP rule | A private endpoint plus the privatelink.vaultcore.azure.net private DNS zone |
| Trusted Microsoft services bypass | Not needed | Optional, and only for services on the documented list | Still applies; those services do not need a private endpoint |
| Rule capacity | Not applicable | Up to 1,000 IPv4 rules and 200 virtual network rules | Not applicable |
| Microsoft Entra authentication and a data-plane role | Required | Required | Required |
| Control-plane operations | Not filtered by firewall rules | Not filtered by firewall rules | Not filtered by firewall rules |
Decision tree
Sharp facts the exam loves — give these one last read before exam day.
Cheat sheet
Sharp facts the exam loves — scan these before test day.
- Key Vault separates secrets, keys, and managed certificates from application code
Deploy Azure Key Vault to centrally store secrets such as connection strings, cryptographic keys, and certificates with their private keys. Applications should reference vault objects instead of embedding sensitive values in source code or configuration.
Trap Store the connection string in an App Service setting and protect only the deployment slot.
7 questions test this
- You have an Azure subscription that contains a key vault named KV1 and a web app named App1. App1 presents a TLS certificate that is stored as a password-protected PFX file in App1's source control re
- Your company deploys an Azure SQL Database logical server by using an Azure Resource Manager template that a release pipeline runs. The administrator password is written into the parameter file that i
- You have an Azure subscription that contains a key vault named KV1 and a function app named Func1. KV1 uses the Azure RBAC permission model and stores a secret that holds a third-party API key. Func1
- You have an Azure subscription that contains an App Service web app named App1 and a key vault named KV1. App1 reads a database connection string from an app setting that stores the value in plaintext
- You have an Azure subscription that contains a key vault named KV1 and an internal document service that runs on Azure App Service. The service must apply RSA digital signatures to documents by using
- Your company has an Azure subscription that contains an Azure Application Gateway v2 instance named AppGw1 and a key vault named KV1 that uses the Azure RBAC permission model. AppGw1 publishes a custo
- Your company publishes a Microsoft Foundry model deployment through an Azure API Management instance named APIM1 that acts as an AI gateway. An inbound policy adds the model endpoint's API key to a he
- Separate vaults reduce the blast radius across applications and environments
Use separate key vaults for different applications, regions, and environments such as development and production when their security boundaries differ. Combining unrelated secrets in one vault broadens the impact of an identity or network compromise.
Trap Place every environment in one vault and separate access only by secret name prefixes.
6 questions test this
- Your Azure subscription named Sub1 contains a key vault named KV1 that holds the secrets of a regulated payroll application. A platform team holds the Key Vault Administrator role at the Sub1 scope so
- Your company has an Azure subscription that contains a key vault named KV1. KV1 stores the API keys that are used by a production Microsoft Foundry deployment and by a development sandbox in which the
- You have an Azure subscription that contains a key vault named KV1 that has its firewall enabled. KV1 stores the secrets of a production web app that runs in a virtual network named VNet1, and it also
- Your Azure subscription contains a key vault named KV1 that stores the secrets of a business-critical web app. KV1 is in a region for which Microsoft provides no replication or failover to a paired re
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure RBAC permission model. KV1 holds the RSA key that encrypts three storage accounts with customer-managed keys, and
- Your Azure subscription contains a key vault named KV1 in the East US region. A line-of-business application runs in East US, West Europe, and Southeast Asia, and every instance of the application ret
- Soft delete preserves deleted vaults and objects for recovery
Key Vault soft delete retains deleted vaults and objects during a configurable 7-to-90-day retention period so they can be recovered. A normal delete does not immediately make the name reusable because the item remains in the deleted state.
Trap Use a resource lock as the mechanism for recovering a deleted secret version.
6 questions test this
- Your company has a management group named MG1 that contains all of the Azure subscriptions used by the application teams, and more subscriptions will join MG1 during the next year. A compliance requir
- You have an Azure subscription named Sub1 that contains a key vault named KV-Prod in the West Europe region. Soft delete and purge protection are both enabled on KV-Prod, and the vault has a retention
- Your company has an Azure subscription named Sub1 that contains a key vault named KV1 in the East US region. KV1 has a soft-delete retention period of 90 days, and purge protection is disabled on the
- Your company has an Azure subscription named Sub1 that contains a sandbox environment which a release pipeline tears down and redeploys every night in the East US region. The environment includes a ke
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure RBAC permission model. An administrator deleted KV1 by mistake, and a member of the platform team recovered the v
- You have an Azure subscription named Sub1 in which several decommissioned projects left key vaults in the soft-deleted state. Purge protection was never enabled on any of those vaults. A platform engi
- Purge protection blocks permanent deletion during retention
Enable purge protection after soft delete when even highly privileged callers must be unable to purge deleted vault content before retention expires. Purge protection protects against malicious or accidental permanent deletion; soft delete alone still permits an authorized purge.
Trap Enable soft delete only and grant purge permission to the vault administrators.
6 questions test this
- You have an Azure subscription named Sub1 that contains a key vault named KV-Prod. A release pipeline redeploys KV-Prod every night from an Azure Resource Manager template in which the vault's purge p
- You have an Azure subscription named Sub1 that contains a key vault named KV1. KV1 uses the Azure RBAC permission model, has soft delete and purge protection enabled, and holds the customer-managed ke
- You have an Azure subscription named Sub1 that contains a soft-deleted key vault named KV-Fin in the East US region. Purge protection was enabled on KV-Fin before the vault was deleted, and 45 days of
- Your company has an Azure subscription named Sub1 in which project teams create their own key vaults for short-lived projects. A new data-retention standard states that after a vault is deleted, its c
- You have an Azure subscription named Sub1 that contains a key vault named KV-Legacy that was created several years ago. Soft delete is disabled on KV-Legacy, and the vault stores the certificates of a
- Your company has a management group named MG1 that contains an Azure subscription named Sub1. A policy assignment at MG1 denies the creation of any key vault that does not have purge protection enable
- Use a separate Key Vault for each tenant in a multitenant solution
Deploy a separate Key Vault for each tenant in a multitenant SaaS solution. A per-tenant vault boundary preserves isolation between customer data and workloads.
- Keep customer content and general configuration outside Key Vault
Use Key Vault for keys, secrets, and certificates, not as a scalable store for customer content or general service configuration. Place customer content in a data service such as Azure Storage or Azure Cosmos DB and use an appropriate configuration store for nonsensitive settings.
- Managing a vault does not inherently grant access to its contents
Key Vault control-plane permissions manage the vault resource, while data-plane permissions operate on keys, secrets, and certificates. A principal can therefore create or configure a vault yet remain unable to read a secret unless separately authorized for the data plane.
Trap Assign Key Vault Contributor to an application that only needs to retrieve secret values.
5 questions test this
- You have an Azure subscription named Sub1 that contains a key vault named KV1. KV1 uses the Azure role-based access control permission model, and no role assignments exist on KV1. You are assigned the
- You have an Azure subscription that contains a storage account named storage1 and a key vault named KV1. KV1 uses the Azure role-based access control permission model, has purge protection enabled, an
- Your company deploys infrastructure by using a pipeline whose service principal, SP1, holds the Key Vault Contributor role at the scope of a subscription named Sub1. A new pipeline stage creates a key
- You have an Azure subscription that contains a key vault named KV1 and a function app named Func1. KV1 uses the Azure role-based access control permission model. A user-assigned managed identity named
- You have an Azure subscription that contains a key vault named KV1. KV1 uses the Azure role-based access control permission model and stores the keys, secrets, and certificates of a production workloa
- Azure RBAC is the recommended Key Vault data authorization model
With the RBAC permission model, grant data access through Azure role assignments at the vault or narrower object scope; legacy vault access policies are a different authorization model. Do not create an access policy for a vault configured to use RBAC authorization.
Trap Add a legacy access policy to repair access on an RBAC-authorized vault.
6 questions test this
- You have an Azure subscription that contains a key vault named KV1 that uses the vault access policy permission model. KV1 has 14 access policies that grant key and secret permissions to applications
- Your company has a management group named MG1 that contains 30 Azure subscriptions, and application teams frequently create key vaults that use the vault access policy permission model. You must preve
- You have an Azure subscription that contains a key vault named KV1 that uses the vault access policy permission model. Three engineers hold standing access policies that grant them full key and secret
- Your company has an Azure subscription that contains a key vault named KV1 that uses the Azure role-based access control permission model. Two application teams store their secrets in KV1. Each team m
- You have an Azure subscription that contains a key vault named KV1 and a function app named Func1. KV1 uses the Azure role-based access control permission model. A user-assigned managed identity named
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure role-based access control permission model. KV1 was deleted by mistake and was then recovered from the soft-delet
- Object-specific Key Vault roles enforce least privilege
Assign Key Vault Secrets User to read secret contents, Key Vault Crypto User to perform cryptographic operations with keys such as sign, verify, encrypt, decrypt, wrap, and unwrap, or Key Vault Certificates Officer to manage certificates, according to the required object type. An Officer role performs any action on its object class, so Key Vault Crypto Officer is the role for managing keys, not for using them, and broad management roles are not required merely to consume one class of vault data.
Trap Assign Owner at the resource-group scope to every application that retrieves one secret.
5 questions test this
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure role-based access control permission model and an Azure Data Factory instance named ADF1. A pipeline in ADF1 copi
- You have an Azure subscription named Sub1 that contains a Premium key vault named KV1 that uses the Azure role-based access control permission model. KV1 stores an exportable HSM-protected RSA key nam
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure role-based access control permission model. KV1 holds 40 secrets that belong to different workloads. Three applic
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure role-based access control permission model and an Azure Application Gateway v2 instance named AGW1 that is deploy
- Your company has an Azure subscription that contains a resource group named RG1. RG1 contains a key vault named KV1 that uses the Azure role-based access control permission model. To let three applica
- Credential-free vault access requires both a managed identity and data permission
Enable a managed identity on the Azure workload and assign that identity the required Key Vault data role when an application must retrieve objects without stored credentials. Network reachability alone, including a private endpoint, does not authenticate or authorize the application.
Trap Create only a private endpoint because the application already resides in the connected virtual network.
6 questions test this
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure role-based access control permission model and an Azure Data Factory instance named ADF1. A pipeline in ADF1 copi
- You have an Azure subscription that contains an API Management instance named APIM1 and a key vault named KV1 that uses the Azure role-based access control permission model. APIM1 uses a user-assigned
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure role-based access control permission model and a container app named App1 in Azure Container Apps. App1 has a sys
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure role-based access control permission model and an Azure Application Gateway v2 instance named AGW1 that is deploy
- Your company has an Azure subscription that contains a resource group named RG1. RG1 contains a key vault named KV1 that uses the Azure role-based access control permission model. To let three applica
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure role-based access control permission model. A stateless workload runs on a virtual machine scale set that is rede
- Grant Key Vault administrative object operations at vault scope
Use a vault-level Azure RBAC assignment for Key Vault administrative operations such as object management, monitoring, and network access control. An object-scope assignment is not read-only - it grants the role's full data actions on the one key, secret, or certificate it names, so a Key Vault Secrets Officer scoped to a single secret can update or delete that secret - but it cannot reach operations that have no object path, such as creating a new secret, enumerating the vault's objects, or changing vault resource settings. Microsoft therefore states that assigning roles on individual keys, secrets, and certificates is not recommended, with exceptions such as a user who must read their own SSH private key to authenticate to a virtual machine through Azure Bastion.
4 questions test this
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure role-based access control permission model. Four application teams hold Key Vault Secrets Officer role assignment
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure role-based access control permission model. KV1 stores 60 secrets that belong to several workloads. A support eng
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure role-based access control permission model. KV1 stores the SSH private key of each of 40 engineers as a separate
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure role-based access control permission model. A deployment pipeline signs in with a user-assigned managed identity
- Key Vault networking filters requests before identity authorization
A vault with its firewall disabled accepts requests from public networks by default, but each caller must still authenticate with Microsoft Entra ID and pass data-plane authorization. Enabling a firewall narrows network reachability and does not replace RBAC or access policies.
Trap Leave public access open because a firewall is unnecessary once the application has a managed identity.
7 questions test this
- You have an Azure subscription that contains a key vault named KV1 and a virtual network named VNet1 that contains a subnet named Subnet1. Virtual machines in Subnet1 read secrets from KV1 by using ma
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure RBAC permission model. The KV1 firewall allows the two public IP address ranges from which your corporate network
- You have an Azure subscription that contains a key vault named KV1 and a virtual machine named VM1 that resides in a subnet named Subnet1. KV1 uses the Azure RBAC permission model. You set the KV1 fir
- You have an Azure subscription that contains a key vault named KV1 and an Azure SQL Database logical server named Server1. Server1 uses transparent data encryption with a customer-managed key that is
- You have an Azure subscription that contains a key vault named KV1 that stores the connection strings of a web app named App1. KV1 uses the Azure RBAC permission model, and App1 authenticates to KV1 w
- You have an Azure subscription named Sub1 in which 40 application teams create their own key vaults. Because the Key Vault firewall is disabled when a vault is created, several vaults in Sub1 currentl
- You have an Azure subscription that contains a key vault named KV1. KV1 stores a customer-managed key that a Recovery Services vault uses to encrypt backups, and the option to allow trusted Microsoft
- Key Vault firewall virtual-network rules require the Key Vault service endpoint
To permit a subnet through a Key Vault virtual-network firewall rule over the public endpoint, enable the Microsoft.KeyVault service endpoint on that subnet and add the subnet rule. An NSG allow rule by itself does not place the subnet on the vault firewall allowlist.
Trap Add only an outbound HTTPS NSG rule from the subnet to the vault's public address.
5 questions test this
- You have an Azure subscription that contains a key vault named KV1 and a virtual machine named VM1 that resides in a subnet named Subnet1. The KV1 firewall denies access by default and contains one IP
- You have an Azure subscription that contains a key vault named KV1 and a virtual network named VNet1 that contains a subnet named Subnet1. Virtual machines in Subnet1 read secrets from KV1 by using ma
- You have an Azure subscription that contains a key vault named KV1 and a virtual machine named VM1 that resides in a subnet named Subnet1. KV1 uses the Azure RBAC permission model. You set the KV1 fir
- You have an Azure subscription in which a central networking team owns a virtual network named VNet1 and its subnet named Subnet1, and your team owns a key vault named KV1. You hold the Key Vault Cont
- You have an Azure subscription that contains a new key vault named KV1 and a virtual network named VNet1 that contains a subnet named Subnet1. Ten virtual machines in Subnet1 must read secrets from KV
- Disable public access when a vault must be reachable only through Private Link
Create a private endpoint, integrate name resolution with the privatelink.vaultcore.azure.net private DNS zone, and disable public network access for private-only data-plane connectivity. A private endpoint does not by itself disable the vault's public endpoint.
Trap Create the private endpoint but leave public network access enabled for all networks.
4 questions test this
- You have an Azure subscription that contains a key vault named KV1 in the West Europe region. An application team runs virtual machines in a subnet named Subnet1 of a virtual network named VNet1 in th
- You have an Azure subscription that contains a key vault named KV1 that has public network access disabled. A partner organization in a different Microsoft Entra tenant runs an application that must r
- You have an Azure subscription that contains a key vault named KV1 and a virtual network named VNet1. To meet a compliance requirement, you create a private endpoint for KV1 in a subnet of VNet1, the
- You have an Azure subscription that contains a key vault named KV1 and a function app named Func1 that runs on Linux in an Elastic Premium plan. KV1 has public network access disabled and a private en
- Trusted-services bypass admits only explicitly listed Microsoft services
Allow trusted Microsoft services to bypass the Key Vault firewall only when the required integration appears on the documented trusted-services list. The option is not a blanket allow for every Azure service; for example, Azure DevOps still needs another permitted network path.
Trap Enable trusted-services bypass and assume any Microsoft-hosted build agent can reach the vault.
5 questions test this
- You have an Azure subscription that contains a key vault named KV1 in the East US region and 20 virtual machines that run Windows Server in the same region. The KV1 firewall denies access by default,
- Your company has an Azure subscription that contains a key vault named KV1. The KV1 firewall denies access by default, and the exception that allows trusted Microsoft services to bypass the firewall i
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure RBAC permission model and an Application Gateway v2 instance named AGW1. KV1 stores the TLS certificate that an H
- You have an Azure subscription that contains a key vault named KV1. You enable the KV1 firewall, set it to deny access by default, and select the exception that allows trusted Microsoft services to by
- You have an Azure subscription that contains a key vault named KV1 that uses the Azure RBAC permission model. You enable the KV1 firewall, add virtual network rules for the application subnets in a vi
- Allow required static public clients with Key Vault IPv4 firewall rules
When a required client must use the public endpoint and has a public static IPv4 address or known CIDR range, enable access from selected networks, add that address or range to the Key Vault firewall allowlist, and keep the default action set to Deny. Sources not matched by an allowed IP, virtual-network rule, trusted-service exception, or other permitted path remain blocked.
6 questions test this
- You have an Azure subscription that contains a key vault named KV7 that stores production secrets. KV7 currently allows public access from all networks. A new standard requires that KV7 accept data-pl
- You have an Azure subscription that contains a key vault named KV9 that stores the secrets of an internal payroll application. The payroll application reaches KV9 through a virtual network rule, and p
- You have an Azure subscription that contains a key vault named KV4 that stores API credentials for a public-facing service. The KV4 networking page lists IP address rules for the two published egress
- Your company has an Azure subscription that contains a key vault named KV5 that several application teams share. The KV5 firewall is disabled, so any network can send requests to the vault. Before you
- Your company has an Azure subscription that contains a key vault named KV2 and a multitenant App Service web app named App4 that must read connection strings from KV2. KV2 allows public access only fr
- Your company has an Azure subscription that contains an App Service web app named App7 that runs on a Premium v4 plan. App7 must read secrets from a key vault named KV8 that a partner security team ad
- Use Network Security Perimeter rules to isolate public PaaS access
Associate Key Vault with a Network Security Perimeter when it must share a logical isolation boundary with supported PaaS resources and admit public inbound access only through explicit perimeter rules. In Secure by perimeter mode, perimeter rules govern all non-private-endpoint traffic and override the Key Vault trusted-services firewall bypass.
- Key rotation creates a new version rather than replacing old key material
A per-key rotation policy can automatically generate a fresh version at a configured interval or before expiration. Consumers should use a versionless key URI to discover the newest version while retaining versioned references needed to decrypt or unwrap data protected by older material.
Trap Delete every previous key version immediately after automatic rotation completes.
10 questions test this
- You have an Azure key vault named KV7 that stores the customer-managed keys for several Azure storage accounts. Soft delete is enabled on KV7 with a 90-day retention period, and several operators hold
- Your company runs a custom payroll service on Azure that generates a data encryption key for every stored document and wraps that key with an RSA key named Key4 in an Azure key vault named KV4. Key4 h
- You have an Azure SQL Database logical server named Server1 whose transparent data encryption (TDE) protector is a customer-managed key named Key10 in an Azure key vault named KV10. Auto-rotate key is
- You have an Azure key vault named KV5 that uses the Azure RBAC permission model and contains a key named Key5. Key5 has a rotation policy that renews the key every two years, and the next scheduled re
- You have an Azure storage account named storage2 that is encrypted with a customer-managed key named Key8 in an Azure key vault named KV8. The encryption settings of storage2 omit the key version. An
- You have an Azure key vault named KV3 that uses the Azure role-based access control (RBAC) permission model. KV3 stores the customer-managed keys for several production storage accounts, and it also s
- Your company stores an RSA key named Key2 in an Azure key vault named KV2. Key2 is generated in an on-premises hardware security module and imported into KV2, and a corporate standard requires that al
- You are configuring an Azure storage account named storage4 to use a customer-managed key named Key14 that is stored in an Azure key vault named KV14. Key14 has a rotation policy that creates a new ve
- You have an Azure key vault named KV12 that an administrator has just converted from vault access policies to the Azure role-based access control (RBAC) permission model. KV12 contains a customer-mana
- Your Azure subscription contains 60 virtual machines whose OS and data disks are encrypted with a customer-managed key named Key9 through a disk encryption set named DES1. Key9 has a Key Vault rotatio
- Rotating a key does not re-encrypt the protected payload
Key Vault rotation creates new wrapping-key material; the target service must rewrap its data-encryption keys with the new version. Keep old and new versions enabled until rewrapping finishes because existing data can still depend on the prior version.
Trap Assume Key Vault automatically decrypts and re-encrypts all application data when the key version changes.
9 questions test this
- Your company runs a custom payroll service on Azure that generates a data encryption key for every stored document and wraps that key with an RSA key named Key4 in an Azure key vault named KV4. Key4 h
- You have an Azure SQL Database logical server named Server1 whose transparent data encryption (TDE) protector is a customer-managed key named Key10 in an Azure key vault named KV10. Auto-rotate key is
- You have an Azure key vault named KV5 that uses the Azure RBAC permission model and contains a key named Key5. Key5 has a rotation policy that renews the key every two years, and the next scheduled re
- You have an Azure storage account named storage2 that is encrypted with a customer-managed key named Key8 in an Azure key vault named KV8. The encryption settings of storage2 omit the key version. An
- Your company has a line-of-business application that stores every customer file with its own data encryption key, and each data encryption key is wrapped by an RSA key named Key13 in an Azure key vaul
- You are configuring an Azure storage account named storage4 to use a customer-managed key named Key14 that is stored in an Azure key vault named KV14. Key14 has a rotation policy that creates a new ve
- You have an Azure key vault named KV12 that an administrator has just converted from vault access policies to the Azure role-based access control (RBAC) permission model. KV12 contains a customer-mana
- Your company has a Microsoft Foundry resource named Foundry1 that encrypts its data at rest with a customer-managed key named Key11 in an Azure key vault named KV11. KV11 is in the same region as Foun
- Your Azure subscription contains 60 virtual machines whose OS and data disks are encrypted with a customer-managed key named Key9 through a disk encryption set named DES1. Key9 has a Key Vault rotatio
- A Key Vault certificate policy governs issuance and renewal across versions
Configure the certificate policy with issuer, validity, key, and lifetime-action settings to control creation and renewal. Integrated certificate authorities and self-signed certificates can support automatic renewal; renewing an integrated-CA certificate creates a new secret version and identifier.
Trap Store the PFX as a generic secret and expect Key Vault certificate autorenewal to manage it.
5 questions test this
- You have an Azure web app named App4 that serves the custom domain www.contoso.com. The TLS certificate bound to App4 was imported from an Azure key vault named KV4, and the certificate renews automat
- Your company has an Azure subscription named Sub5 that contains 30 key vaults owned by different application teams. A new security standard states that any TLS certificate created in a key vault in Su
- Your company has an Azure key vault named KV2 that stores a TLS certificate named Cert2 for an internal web application. Cert2 was issued by your organization's own certificate authority, which is not
- You have an Azure key vault named KV1 that uses the Azure role-based access control permission model. KV1 contains a certificate named Cert1 that was created through a DigiCert issuer object configure
- Your company centralizes public key infrastructure in an Azure key vault named KV-PKI, where the security team created a certificate issuer object named DigiCertIssuer that holds the DigiCert account
- Secrets need explicit expiration and rotation procedures
Set expiration metadata, monitor approaching expiry, and create a new secret version when a credential changes; Key Vault does not automatically rotate arbitrary application secrets. Update or reload consumers before disabling the old version to avoid an outage.
Trap Enable a cryptographic key rotation policy and expect it to rotate database passwords stored as secrets.
3 questions test this
- You have an Azure web app named App10 whose app settings use Key Vault references to read a database connection string from an Azure key vault named KV10. The system-assigned managed identity of App10
- You have an Azure Kubernetes Service cluster named AKS11 that uses the Azure Key Vault provider for Secrets Store CSI Driver add-on. Pods mount an API key from an Azure key vault named KV11 as a file
- You have an Azure key vault named KV12 that uses the Azure role-based access control permission model and stores application credentials as secrets, keys, and certificates. You deploy a function app n
- Store managed certificates as Key Vault certificate objects
Store a service-owned certificate as a Key Vault certificate object, not as a generic secret, when Key Vault must manage issuance and autorenewal. A generic secret can hold certificate data but does not provide the managed certificate lifecycle.
5 questions test this
- You have an Azure Application Gateway v2 instance named AGW1 that terminates TLS for an internal web app. A premium key vault named KV3 stores the site's certificate, which the security team created w
- Your company has an Azure API Management instance named APIM1 in the Premium tier whose gateway calls an internal AI backend that requires mutual TLS. The client certificate is stored in a key vault n
- Your company protects outbound traffic with an Azure Firewall Premium instance named FW1 that uses a firewall policy named FWPolicy1. You must enable TLS inspection on FWPolicy1 by using the intermedi
- Your company has an Azure Key Vault Managed HSM instance named HSM1 and a premium key vault named KV4 in the same subscription. You must obtain the TLS certificate for an internal service from the cor
- You have an Azure subscription that contains a key vault named KV5 and an internal application named App5 that signs outbound messages with an X.509 certificate stored in KV5. KV5 contains a GlobalSig
- Back up irreplaceable vault objects and test their restoration
Use Key Vault native backup for keys, secrets, and certificates that cannot be recreated from another source. Regularly restore test copies to verify the recovery procedure; object backup is a separate recoverability control from retaining a deletion through soft delete.
- Defender CSPM can discover plaintext secrets without an installed VM agent
Enable agentless machine scanning in Defender CSPM to identify supported exposed credentials on Azure, AWS, and GCP virtual-machine disks without installing an agent or affecting machine performance. Defender for Servers Plan 2 can also provide machine secrets scanning, but Defender CSPM is required for the broader posture scenario.
Trap Deploy the Log Analytics agent and search only Key Vault diagnostic logs for secrets embedded on VM disks.
9 questions test this
- You have an Azure subscription named Sub1 that has the Microsoft Defender Cloud Security Posture Management (CSPM) plan enabled and Agentless scanning for machines turned on. The Recommendations page
- Your company has an Azure subscription and an AWS account that are both connected to Microsoft Defender for Cloud, and the Defender Cloud Security Posture Management (CSPM) plan is enabled on both env
- Your company has an Amazon Web Services (AWS) account that is connected to Microsoft Defender for Cloud through a connector named AWSConn1, and the Defender Cloud Security Posture Management (CSPM) pl
- You have an Azure subscription named Sub1 that contains 30 virtual machines and has the Microsoft Defender for Servers Plan 2 plan enabled, and secrets findings are already reported for the virtual ma
- You have an Azure subscription named Sub1 that contains 25 virtual machines that run Windows Server. Only the Microsoft Defender for Servers Plan 1 plan is currently enabled on Sub1. Your security tea
- You have an Azure subscription named Sub1 that contains 60 virtual machines. Sub1 has the Microsoft Defender Cloud Security Posture Management (CSPM) plan enabled, and Agentless scanning for machines
- You have an Azure subscription named Sub1 that contains 80 virtual machines. Sub1 has the Microsoft Defender Cloud Security Posture Management (CSPM) plan enabled, and Agentless scanning for machines
- You have an Azure subscription named Sub1 that contains 40 virtual machines. Sub1 has the Microsoft Defender Cloud Security Posture Management (CSPM) plan enabled, and Agentless scanning for machines
- Your company uses Microsoft Defender for Cloud to protect an Azure subscription, an AWS account, and a GCP project. The Defender Cloud Security Posture Management (CSPM) plan and agentless machine sca
- Defender CSPM extends secret discovery beyond running machines
Use cloud-deployment resource scanning to find secrets in multicloud infrastructure-as-code deployment resources and code-repository scanning for connected DevOps repositories. These scanning surfaces complement, rather than duplicate, Key Vault's storage protections.
Trap Enable Defender for Key Vault and expect it to inspect plaintext credentials committed to a repository.
4 questions test this
- Your company has an Azure subscription and an AWS account that are both connected to Microsoft Defender for Cloud, and the Defender Cloud Security Posture Management (CSPM) plan is enabled on both env
- You have an Azure subscription named Sub1 that contains 30 virtual machines and has the Microsoft Defender for Servers Plan 2 plan enabled, and secrets findings are already reported for the virtual ma
- Your company connects an Azure DevOps organization to Microsoft Defender for Cloud by using a connector that is deployed to a resource group named RG-Sec in a subscription named Sub1. An internal audi
- Your company stores all of its application code in an Azure DevOps organization named Contoso1 that is connected to Microsoft Defender for Cloud, and the Defender Cloud Security Posture Management (CS
- Secrets findings feed recommendations, inventory, graph queries, and attack paths
Review discovered secrets through affected-resource inventory and Defender for Cloud recommendations, then use cloud security explorer or attack-path analysis to understand reachable assets and lateral-movement risk. Merely moving a detected credential into Key Vault is insufficient if the exposed value remains valid elsewhere.
Trap Dismiss the finding after deleting the plaintext file without rotating the exposed credential.
6 questions test this
- You have an Azure subscription named Sub1 that contains a key vault named KV1. Microsoft Defender for Key Vault raised an alert for KV1, and your review of the alert confirms that an unauthorized call
- You have an Azure subscription named Sub1 that contains a key vault named KV1. Microsoft Defender for Key Vault raised an alert for KV1, and your review of the alert confirms that an unauthorized call
- A machine secrets finding in Microsoft Defender for Cloud reports that a virtual machine named VM1 keeps a plaintext Azure Cosmos DB connection string that carries the primary key of an account named
- You have an Azure subscription named Sub1 that has the Defender Cloud Security Posture Management (CSPM) plan enabled and Agentless scanning for machines turned on. The Defender for Cloud asset invent
- You have an Azure subscription named Sub1 that has the Defender Cloud Security Posture Management (CSPM) plan enabled and Agentless scanning for machines turned on. The Machines should have secrets fi
- You have an Azure subscription named Sub1 that has the Defender Cloud Security Posture Management (CSPM) plan enabled. Agentless secrets scanning discovers a plaintext Azure App Service deployment pas
- Defender for Key Vault alerts on suspicious data-plane behavior
Enable Microsoft Defender for Key Vault to detect unusual or potentially harmful attempts to access vaults and produce contextual security alerts. It adds threat detection, not network prevention, so firewall restrictions, least-privilege authorization, and diagnostic logging remain separate controls.
Trap Use Defender for Key Vault instead of configuring the vault firewall because alerts block suspicious requests automatically.
7 questions test this
- You have an Azure subscription named Sub1 that contains a key vault named KV1. Microsoft Defender for Key Vault is enabled on Sub1 and raises a Suspicious secret listing and query in a key vault alert
- You have an Azure subscription named Sub1 that contains a key vault named KV1. Microsoft Defender for Key Vault raised an alert for KV1, and your review of the alert confirms that an unauthorized call
- You have an Azure subscription named Sub1 that contains a key vault named KV1. Microsoft Defender for Key Vault is enabled on Sub1 and raises a Suspicious secret listing and query in a key vault alert
- You have an Azure subscription named Sub1 that contains a key vault named KV1. Microsoft Defender for Key Vault raised an alert for KV1, and your review of the alert confirms that an unauthorized call
- Your security operations team monitors an Azure subscription named Sub1 in which Microsoft Defender for Key Vault protects eight key vaults. The team has just configured a continuous export rule that
- You have an Azure subscription named Sub1 that contains a key vault named KV1 that uses Azure role-based access control (RBAC) authorization. Microsoft Defender for Key Vault raises an Unusual applica
- You have an Azure subscription named Sub1 that contains a key vault named KV1 that stores production credentials for several applications. Microsoft Defender for Key Vault is enabled on Sub1. During a
- Use the appropriate Key Vault channel for audit, security, and lifecycle signals
Enable Key Vault audit logging to record vault operations and configure log alerts for security-relevant events such as access failures or secret deletions. Use Event Grid subscriptions for change notifications about keys, secrets, and certificates; lifecycle events do not replace operation audit logs or security alerts.
2 questions test this
- You have an Azure subscription named Sub1 that contains a key vault named KV1. Your security operations team runs a third-party SIEM platform outside Azure that already consumes data from an Azure Eve
- You have an Azure subscription named Sub1 that contains 14 key vaults and a Log Analytics workspace named Workspace1. None of the vaults currently records the operations that callers perform on its ke
References
- Azure Key Vault overview
- Azure Key Vault keys, secrets, and certificates overview
- Azure Key Vault service limits
- Grant permission to applications to access an Azure key vault using Azure RBAC
- Azure Key Vault soft-delete overview
- Microsoft.KeyVault vaults resource definition
- Azure Key Vault backup and restore
- Prepare for Key Vault API version 2026-02-01 and later
- Managed identities for Azure resources
- Managed identities for Azure resources frequently asked questions FAQ
- Configure network security for Azure Key Vault
- Integrate Key Vault with Azure Private Link
- Virtual network service endpoints for Azure Key Vault
- What is a network security perimeter?
- Configure cryptographic key auto-rotation in Azure Key Vault
- Understanding autorotation in Azure Key Vault
- About Azure Key Vault certificates
- Automate the rotation of a secret for resources that have one set of authentication credentials
- About Azure Key Vault secrets
- Monitoring Key Vault with Azure Event Grid
- Microsoft Defender for Key Vault: benefits and features
- Protecting secrets in Microsoft Defender for Cloud
- Build queries with cloud security explorer
- Identify and remediate attack paths
- Azure Key Vault logging