Share via


Get Deleted Certificates - Get Deleted Certificates

Lists the deleted certificates in the specified vault currently available for recovery.
The GetDeletedCertificates operation retrieves the certificates in the current vault which are in a deleted state and ready for recovery or purging. This operation includes deletion-specific information. This operation requires the certificates/get/list permission. This operation can only be enabled on soft-delete enabled vaults.

GET {vaultBaseUrl}/deletedcertificates?api-version=2025-07-01
GET {vaultBaseUrl}/deletedcertificates?api-version=2025-07-01&maxresults={maxresults}&includePending={includePending}

URI Parameters

Name In Required Type Description
vaultBaseUrl
path True

string (uri)

api-version
query True

string

minLength: 1

The API version to use for this operation.

includePending
query

boolean

Specifies whether to include certificates which are not completely provisioned.

maxresults
query

integer (int32)

minimum: 1
maximum: 25

Maximum number of results to return in a page. If not specified the service will return up to 25 results.

Responses

Name Type Description
200 OK

DeletedCertificateListResult

The request has succeeded.

Other Status Codes

KeyVaultError

An unexpected error response.

Security

OAuth2Auth

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
https://vault.azure.net/.default

Examples

GetDeletedCertificates

Sample request

GET https://myvault.vault.azure.net//deletedcertificates?api-version=2025-07-01&maxresults=1

Sample response

{
  "value": [
    {
      "recoveryId": "https://myvault.vault.azure.net/deletedcertificates/listdeletedcerttest0",
      "deletedDate": 1493937659,
      "scheduledPurgeDate": 1501713659,
      "id": "https://myvault.vault.azure.net/certificates/listdeletedcerttest0",
      "x5t": "fLi3U52HunIVNXubkEnf8tP6Wbo",
      "attributes": {
        "enabled": true,
        "nbf": 1430344421,
        "exp": 2208988799,
        "created": 1493937658,
        "updated": 1493937658,
        "recoveryLevel": "Recoverable+Purgeable"
      }
    }
  ],
  "nextLink": "https://myvault.vault.azure.net:443/deletedcertificates?api-version=7.2&$skiptoken=eyJOZXh0TWFya2VyIjoiMiExMTIhTURBd01ETTVJV05sY25ScFptbGpZWFJsTDB4SlUxUkVSVXhGVkVWRVEwVlNWRlJGVTFRd0wxQlBURWxEV1NFd01EQXdNamdoT1RrNU9TMHhNaTB6TVZReU16bzFPVG8xT1M0NU9UazVPVGs1V2lFLSIsIlRhcmdldExvY2F0aW9uIjowfQ&maxresults=1"
}

Definitions

Name Description
CertificateAttributes

The certificate management attributes.

DeletedCertificateItem

The deleted certificate item containing metadata about the deleted certificate.

DeletedCertificateListResult

A list of certificates that have been deleted in this vault.

DeletionRecoveryLevel

Reflects the deletion recovery level currently in effect for secrets in the current vault. If it contains 'Purgeable', the secret can be permanently deleted by a privileged user; otherwise, only the system can purge the secret, at the end of the retention interval.

Error
KeyVaultError

The key vault error exception.

CertificateAttributes

The certificate management attributes.

Name Type Description
created

integer (unixtime)

Creation time in UTC.

enabled

boolean

Determines whether the object is enabled.

exp

integer (unixtime)

Expiry date in UTC.

nbf

integer (unixtime)

Not before date in UTC.

recoverableDays

integer (int32)

softDelete data retention days. Value should be >=7 and <=90 when softDelete enabled, otherwise 0.

recoveryLevel

DeletionRecoveryLevel

Reflects the deletion recovery level currently in effect for certificates in the current vault. If it contains 'Purgeable', the certificate can be permanently deleted by a privileged user; otherwise, only the system can purge the certificate, at the end of the retention interval.

updated

integer (unixtime)

Last updated time in UTC.

DeletedCertificateItem

The deleted certificate item containing metadata about the deleted certificate.

Name Type Description
attributes

CertificateAttributes

The certificate management attributes.

deletedDate

integer (unixtime)

The time when the certificate was deleted, in UTC

id

string

Certificate identifier.

recoveryId

string

The url of the recovery object, used to identify and recover the deleted certificate.

scheduledPurgeDate

integer (unixtime)

The time when the certificate is scheduled to be purged, in UTC

tags

object

Application specific metadata in the form of key-value pairs.

x5t

string (base64url)

Thumbprint of the certificate.

DeletedCertificateListResult

A list of certificates that have been deleted in this vault.

Name Type Description
nextLink

string

The URL to get the next set of deleted certificates.

value

DeletedCertificateItem[]

A response message containing a list of deleted certificates in the vault along with a link to the next page of deleted certificates.

DeletionRecoveryLevel

Reflects the deletion recovery level currently in effect for secrets in the current vault. If it contains 'Purgeable', the secret can be permanently deleted by a privileged user; otherwise, only the system can purge the secret, at the end of the retention interval.

Value Description
Purgeable

Denotes a vault state in which deletion is an irreversible operation, without the possibility for recovery. This level corresponds to no protection being available against a Delete operation; the data is irretrievably lost upon accepting a Delete operation at the entity level or higher (vault, resource group, subscription etc.)

Recoverable+Purgeable

Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval (90 days), unless a Purge operation is requested, or the subscription is cancelled. System wil permanently delete it after 90 days, if not recovered

Recoverable

Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval (90 days) and while the subscription is still available. System wil permanently delete it after 90 days, if not recovered

Recoverable+ProtectedSubscription

Denotes a vault and subscription state in which deletion is recoverable within retention interval (90 days), immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled. System wil permanently delete it after 90 days, if not recovered

CustomizedRecoverable+Purgeable

Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge when 7 <= SoftDeleteRetentionInDays < 90). This level guarantees the recoverability of the deleted entity during the retention interval, unless a Purge operation is requested, or the subscription is cancelled.

CustomizedRecoverable

Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge when 7 <= SoftDeleteRetentionInDays < 90).This level guarantees the recoverability of the deleted entity during the retention interval and while the subscription is still available.

CustomizedRecoverable+ProtectedSubscription

Denotes a vault and subscription state in which deletion is recoverable, immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled when 7 <= SoftDeleteRetentionInDays < 90. This level guarantees the recoverability of the deleted entity during the retention interval, and also reflects the fact that the subscription itself cannot be cancelled.

Error

Name Type Description
code

string

The error code.

innererror

Error

The key vault server error.

message

string

The error message.

KeyVaultError

The key vault error exception.

Name Type Description
error

Error

The key vault server error.