Az keyvault list-deleted

Recently, I got the requirement to use the az keyvault list-deleted command. In this article, I will take you through the syntax and the usage of the az keyvault list-deleted command with examples.

Az keyvault list-deleted

This command gets information about the deleted Vaults or HSMs under a subscription.

Syntax

az keyvault list-deleted [--resource-type]

Example

The below command will get you the lists of Azure key vaults deleted under a subscription.

az keyvault list-deleted

After executing the above command, I got the expected output as shown below.

[
  {
    "id": "/subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/azurelessonsKV",
    "name": "azurelessonsKV",
    "properties": {
      "deletionDate": "2025-01-30T13:52:11+00:00",
      "location": "eastus",
      "purgeProtectionEnabled": null,
      "scheduledPurgeDate": "2025-04-30T13:52:11+00:00",
      "tags": {},
      "vaultId": "/subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/MyNewResGrp/providers/Microsoft.KeyVault/vaults/azurelessonsKV"
    },
    "type": "Microsoft.KeyVault/deletedVaults"
  }
]

You can see the same output in the screenshot below.

Az keyvault list-deleted

If you accidentally delete the Azure key vault, you can use the az keyvault recover to recover the deleted Azure key vault.

You may also like following the articles below.

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!