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).
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
- 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
- AADSTS50076 Azure AD (Entra ID): AADSTS50076 / AADSTS50079 — multi-factor authentication required
- AuthorizationPermissionMismatch Azure Storage: AuthorizationPermissionMismatch (403) — This request is not authorized to perform this operation using this permission
- AADSTS700016 Azure AD (Entra ID): AADSTS700016 Application not found in the directory
Other ways to find it
🧠 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026