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).
A secret with (name/id) was not found in this key vault 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
- List secrets: az keyvault secret list
- Recover soft-deleted: az keyvault secret recover
- Fix the reference URI
Detailed fix by platform
Azure CLI
- 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
- Name — Exact name/version
- Vault — Right one?
- 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:
Similar errors
Most viewed in Azure
- AADSTS50053 AADSTS50053: Your account is locked (Smart Lockout) / sign-in blocked due to suspicious activity
- MissingSubscriptionRegistration MissingSubscriptionRegistration: The subscription is not registered to use namespace 'Microsoft.X'
- AuthorizationPermissionMismatch Azure Storage: AuthorizationPermissionMismatch (403) — This request is not authorized to perform this operation using this permission
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 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.
Report a correction or suggest an improvement
Last updated 15 Oct 2026