An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
Force the dedicated Key Vault-reference refresh, then correlate that request in the vault audit log; if no request appears—or it uses the current identity and is still denied despite its verified role—treat this as an App Service resolver/platform incident rather than recreating the identity again.
1. Force the reference resolver to run
A restart normally triggers a refetch, but App Service also provides a specific management operation for refreshing all Key Vault references. This is distinct from restarting the worker. App Service otherwise caches references and periodically refetches them.^1^
Run:
APP_ID=$(az webapp show \
--resource-group <resource-group> \
--name <app-name> \
--query id -o tsv)
az rest --method post \
--uri "https://management.azure.com${APP_ID}/config/configreferences/appsettings/refresh?api-version=2022-03-01"
Immediately query the status again:
az rest --method get \
--uri "https://management.azure.com${APP_ID}/config/configreferences/appsettings?api-version=2023-12-01"
Expected result: both references change to a resolved/healthy state. If they remain AccessToKeyVaultDenied, continue directly to the audit correlation rather than waiting another 24 hours.
2. Identify what the resolver actually presented to Key Vault
Enable the Key Vault AuditEvent diagnostic log if it is not already enabled, repeat the refresh, and inspect the resulting SecretGet events. Key Vault audit records expose the operation, HTTP result, caller IP, correlation ID, and identity claims—including the object identifier presented in the token.^2^
Compare that object ID with the App Service’s current system-assigned principal ID:
az webapp identity show \
--resource-group <resource-group> \
--name <app-name> \
--query principalId -o tsv
Interpret the result:
-
SecretGetsucceeds: The vault accepted the request, but App Service continues reporting a denial. Capture the successful event and stale configuration-reference status for support. -
SecretGetreturns 403 with a different object ID: The resolver is using a different identity than expected. A 403 means the request was authenticated, but the presented identity or source address was not authorized.^3^ -
SecretGetreturns 403 with the current system-assigned principal ID: Since that exact principal already hasKey Vault Secrets Userat vault scope and networking is unrestricted, preserve the audit event and role-assignment evidence for escalation. - No matching
SecretGetappears after the refresh: This strongly localizes the failure to App Service’s reference-resolution path before it reaches the vault.
Avoid assigning the role to the Microsoft Azure App Service enterprise application: that identity applies to platform certificate operations, whereas per-app secret access uses the Web App’s managed identity.^4^
3. Run the App Service detector and escalate
In the Azure portal, open:
App Service → Diagnose and solve problems → Availability and Performance → Web app down → search for “Key Vault Application Settings Diagnostics”
This is the documented detector for unresolved App Service Key Vault references.^1^
If it does not identify a customer-configurable fault, open an Azure support request under App Service → Managed Identity Integration and include:
- App Service and Key Vault resource IDs.
- UTC timestamp of the forced refresh.
- Refresh request/correlation ID, if returned.
- Current system-assigned principal ID.
- Role-assignment ID and scope.
- Configuration-reference status response.
- Matching Key Vault
SecretGetaudit event, or confirmation that none was generated. - App Service region and affected deployment slot.
A backend resolver inconsistency has caused comparable Key Vault-reference failures in a specific region and required targeted platform recovery, so escalation is appropriate once the audit correlation rules out the actual caller, RBAC, and network path.^5^ That report concerned Azure Functions in another region, so it establishes the possible failure class—not that the same incident affects this App Service.
Switching to a user-assigned identity is unlikely to fix this case by itself because two fresh system-assigned identities have already failed. It remains useful for lifecycle stability, but should be considered after the resolver incident is diagnosed, not as another immediate RBAC experiment.
References
- Use Key Vault References as App Settings - Azure App Service
- Azure Key Vault logging
- Azure Key Vault REST API Error Codes
- Transition Azure Key Vaults to Azure RBAC - Microsoft Q&A
- Function app with system assigned identity has developed issue where Keyvault references in Environment Variables no longer resolve - Microsoft Q&A