Key Vault vs App Configuration: where each value belongs
Verdict: Secrets, keys and certificates go in Key Vault. Non-secret settings and feature flags go in App Configuration. App Configuration holds Key Vault references, not secret copies; the app's provider resolves them live with the app's managed identity.
| Criterion | Key Vault | App Configuration |
|---|---|---|
| Stores | Secrets, keys, certificates | Non-secret settings and feature flags |
| Example values | Connection strings, API keys, passwords | Retry counts, endpoint URLs, feature toggles, max page size |
| Secret handling | Holds the secret value | Holds only a Key Vault reference (a URI to the secret); the app's provider fetches the value from Key Vault |
| App access | Managed identity plus a data-plane role such as Key Vault Secrets User. App Service app settings can hold a Key Vault reference, no code changes | Managed identity plus a data-plane role such as App Configuration Data Reader |
| Network isolation | Private endpoint plus disable public network access for a no-internet path | Private endpoint; public access is denied once one is added |
Rules
- App Configuration is purpose-built for centrally managing settings and feature flags across microservices; it complements Key Vault, not replaces it.
- A Key Vault reference in App Configuration stores only the URI of the secret; the app's provider fetches the value from Key Vault at load time.
- Store connection strings and third-party API keys in Key Vault; store non-secret settings like page size in App Configuration.
- Give a Container Apps job a managed identity and a data-plane role on App Configuration instead of storing a connection string.
- For a no-internet path to a vault, configure a private endpoint and disable public network access.
- Set an App Service application setting to a Key Vault reference and grant the app's managed identity read access; no SDK code needed.
Traps
- Relocating a connection string into App Configuration still stores a secret; the documented fix is managed identity, not a different store.
- App Configuration should not hold secret values; keep the secret in Key Vault and store a Key Vault reference in App Configuration.
- Where the service supports managed identity, use it: encrypting or auto-rotating a stored secret still stores one. When a secret cannot be avoided, keep it in Key Vault and rotate it.