---
title: "Get a specified secret from a given key vault."
method: GET
path: "/secrets/{secret-name}/{secret-version}"
tags: ["Secrets"]
---

# Get a specified secret from a given key vault.

`GET /secrets/{secret-name}/{secret-version}`

The GET operation is applicable to any secret stored in Azure Key Vault. This operation requires the secrets/get permission.

## Path parameters

- `secret-name` string, required
- `secret-version` string, required

## Query parameters

- `api-version` string, required

## Response `200`

The retrieved secret.

- SecretBundle — A secret consisting of a value, id and its attributes.
  - `value` string — The secret value.
  - `id` string — The secret id.
  - `contentType` string — The content type of the secret.
  - `attributes` SecretAttributes — The object attributes managed by the KeyVault service.
    - `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.
  - `tags` object — Application specific metadata in the form of key-value pairs.
  - `kid` string — If this is a secret backing a KV certificate, then this field specifies the corresponding key backing the KV certificate.
  - `managed` boolean — True if the secret's lifetime is managed by key vault. If this is a secret backing a certificate, then managed will be true.

## Other responses

- `default` — Key Vault error response describing why the operation failed.

---

[API](https://skmtc.net/azure/apis/keyvaultclient.md) · [All operations](https://skmtc.net/azure/apis/keyvaultclient/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/keyvaultclient/revisions/1f612999ec40/schema)
