---
title: "Lists deleted secrets for the specified vault."
method: GET
path: "/deletedsecrets"
---

# Lists deleted secrets for the specified vault.

`GET /deletedsecrets`

The Get Deleted Secrets operation returns the secrets that have been deleted for a vault enabled for soft-delete. This operation requires the secrets/list permission.

## Query parameters

- `api-version` string, required
- `maxresults` integer

## Response `200`

The request has succeeded.

- DeletedSecretListResult — The deleted secret list result
  - `value` DeletedSecretItem[] — A response message containing a list of deleted secrets in the key vault along with a link to the next page of deleted secrets.
    - `id` string — Secret identifier.
    - `attributes` SecretAttributes — The secret management attributes.
      - `enabled` boolean — Determines whether the object is enabled.
      - `nbf` integer — Not before date in UTC.
      - `exp` integer — Expiry date in UTC.
      - `created` integer — Creation time in UTC.
      - `updated` integer — Last updated time in UTC.
      - `recoverableDays` integer — softDelete data retention days. Value should be >=7 and <=90 when softDelete enabled, otherwise 0.
      - `recoveryLevel` 'Purgeable' | 'Recoverable+Purgeable' | 'Recoverable' | 'Recoverable+ProtectedSubscription' | 'CustomizedRecoverable+Purgeable' | 'CustomizedRecoverable' | 'CustomizedRecoverable+ProtectedSubscription' — 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.
    - `tags` object — Application specific metadata in the form of key-value pairs.
    - `contentType` string — Type of the secret value such as a password.
    - `managed` boolean — True if the secret's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true.
    - `recoveryId` string — The url of the recovery object, used to identify and recover the deleted secret.
    - `scheduledPurgeDate` integer — The time when the secret is scheduled to be purged, in UTC
    - `deletedDate` integer — The time when the secret was deleted, in UTC
  - `nextLink` string — The URL to get the next set of deleted secrets.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.dev/azure/apis/keyvault-secrets.md) · [All operations](https://skmtc.dev/azure/apis/keyvault-secrets/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/keyvault-secrets/revisions/e4f78a39a766/schema)
