AzuAzure KeyVault – Create, Purge or Soft Delete or Recover secretes

Today in this article, we will go over a few basic commands for Azure KeyVault – Create, Purge or Soft Delete or Recover secretes.

Using Portal to delete the Vault Secretes

f you need to delete an app secrete, then you can delete the secretes using the below option,

Azure KeyVault Create Purge or Soft Delete or Recover secretes

If you need to delete an app secrete then use the below command,

Command

az keyvault secret purge --name appsecret --vault-name newvault1000

Example

az keyvault secret purge --name appsecret --vault-name newvault1000

If the deletes are enabled as soft delete , means all the secretes deleted will go into a retention period and will be retained up to 90 days after the cut-off time.

Recover deleted secretes

Command

az keyvault secret recover --name appsecret --vault-name newvault1000

Example

az keyvault secret recover --name appsecret --vault-name newvault1000

Get the list of deleted secretes

Command

az keyvault secret list-deleted --vault-name newvault1000

Example

az keyvault secret list-deleted --vault-name thecodebuzz-key-vault
blank

References :

Do you have any comments or ideas or any better suggestions to share?

Please sound off your comments below.

Happy Coding !!

Leave a Reply

Your email address will not be published. Required fields are marked *