Delete versions of the secret in Key Vault?

Mr. B 26 Reputation points
2026-08-26T20:50:49.9933333+00:00

We have a scenario where we need to purge older versions of a secret in Azure Key Vault. From what I can tell, there's no API that supports this — you can delete an entire secret, but I don't see a way to delete individual versions.

Can anyone confirm whether this is a supported scenario? If it is, could you point me to the relevant API?

Azure Key Vault
Azure Key Vault

An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.

0 comments No comments

2 answers

Sort by: Newest
  1. TP 163.1K Reputation points Volunteer Moderator
    2026-08-26T21:13:44.7966667+00:00

    Hi,

    No, you cannot delete individual versions of a secret. Please see excerpt from Delete Secret documentation below:

    Deletes a secret from a specified key vault.

    The DELETE operation applies to any secret stored in Azure Key Vault. DELETE cannot be applied to an individual version of a secret. This operation requires the secrets/delete permission.

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-08-26T20:50:59.9733333+00:00

    No. Deleting individual secret versions in Azure Key Vault is not supported.

    The supported secret operations include:

    • get a secret
    • list secrets
    • list secret versions
    • set a secret
    • update a secret
    • delete a secret
    • get/list deleted secrets
    • purge a deleted secret
    • recover a deleted secret
    • backup/restore a secret

    There is no operation to delete a specific version of a secret. The CLI command az keyvault secret delete deletes all versions of a secret, not a single version. Microsoft documentation also states that it is not possible to delete previous versions of a key, secret, or certificate.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.