SecretNotFound Azure Origin: Platform & cloud Last updated 15 Oct 2026

Key Vault: (SecretNotFound) A secret with (name/id) x was not found in this key vault

The secret name (or version) doesn’t exist in that vault — typo, wrong vault, or the secret is deleted (soft-deleted).

Exact message you may see A secret with (name/id) was not found in this key vault
Seen on: Azure

Meaning

Secret names are case-insensitive but must match exactly otherwise. Deleted secrets stay in a soft-deleted state and can block recreating the same name until recovered or purged.

Common causes

  • Wrong secret name or vault
  • Secret deleted (soft-delete)
  • Specific version no longer exists
  • App Service Key Vault reference using wrong URI

⚡ Quick fix

  1. List secrets: az keyvault secret list
  2. Recover soft-deleted: az keyvault secret recover
  3. Fix the reference URI

Detailed fix by platform

Azure CLI

  1. bash
    az keyvault secret list --vault-name kv-app --query "[].name"
    az keyvault secret list-deleted --vault-name kv-app
    az keyvault secret recover --vault-name kv-app -n DbPassword

How to diagnose

  1. Name — Exact name/version
  2. Vault — Right one?
  3. Deleted — In list-deleted?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

AADSTS500113 — AADSTS500113: No reply address is registered for the application (Azure)AADSTS500113AADSTS50020 — AADSTS50020: User account from identity provider does not exist in tenant and cannot access the application (Azure)AADSTS50020AADSTS7000222 — AADSTS7000222: The provided client secret keys for app are expired (Azure)AADSTS7000222CreateContainerConfigError — Kubernetes: CreateContainerConfigError — secret / configmap not found (Kubernetes)CreateContainerConfig…Key Vault Forbidden — Key Vault: (Forbidden) The user, group or application does not have secrets get permission on key vault (Azure)Key Vault ForbiddenResourceInitializationError — ECS: ResourceInitializationError: unable to pull secrets or registry auth (AWS)ResourceInitializatio…ResourceNotFound — ResourceNotFound: The Resource 'Microsoft.X/...' under resource group 'y' was not found (Azure)ResourceNotFoundSecretNot…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.