Other Articles

Key Vault – Enable Purge Protection

Secure Configuration Checks > Azure

This check ensures that purge protection is enabled on Azure Key Vaults. When purge protection is on, a deleted vault or deleted key cannot be permanently removed until the retention period ends, even by an administrator.

Check Details

  • Resource: Key Vault
  • Check: Enable Key Vault Purge Protection
  • Risk: Without purge protection, a deleted key vault or key can be permanently purged right away, either by mistake or by a malicious actor, and the keys and data protected by them cannot be recovered.

Before you start

  • Soft delete must be enabled on the vault. It is on by default for all vaults.
  • Purge protection cannot be turned off once it is enabled.

Remediation via Azure Portal

  1. Log in to the Azure Portal. Azure Portal dashboard
  2. Navigate to Key vaults and select the affected key vault. Azure Key vaults list
  3. In the left menu, click on Properties under Settings. Properties in the Key Vault menu
  4. Under Soft-delete, select Enable purge protection (enforce a mandatory retention period for deleted vaults and vault objects). Purge protection option selected
  5. Click Save to apply the changes.

Remediation via Azure CLI

  1. Open Azure Cloud Shell from the Azure Portal or use a local terminal with Azure CLI installed. Azure Cloud Shell
  2. Run the following command to enable purge protection:
    az keyvault update \
    --name <key-vault-name> \
    --resource-group <resource-group-name> \
    --enable-purge-protection true
    

    Replace <key-vault-name> and <resource-group-name> with your actual values.

Updated on 04 November, 2026