An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
Hello @Muhammad Wasim Rashid
Your RBAC configuration appears correct: with enableRbacAuthorization: true, the App Service managed identity needs the Key Vault Secrets User role at the vault or secret scope. Key Vault references use the system-assigned identity by default, so an unset keyVaultReferenceIdentity is expected in this configuration.
At this point, recreating the identity again is unlikely to provide useful evidence. Next, determine which identity Key Vault actually receives.
Enable the Key Vault AuditEvent diagnostic log, force another reference refresh, and inspect the resulting SecretGet request. Key Vault logs include the caller identity, object identifier, application ID, caller IP address, HTTP status, and result description.
Force the refresh with:
POST https://management.azure.com/{app-resource-id}/config/configreferences/appsettings/refresh?api-version=2022-03-01
App Service caches Key Vault references for up to 24 hours; this endpoint is the supported way to trigger an immediate refetch.
Compare the oid or object-identifier claim in the Key Vault log with the current App Service principalId:
- If they differ, the platform resolver is using a different or stale identity.
- If they match and Key Vault returns HTTP 403, the log’s result description should distinguish an RBAC denial from a firewall/network denial. HTTP 403 means the caller was authenticated, but authorization or network policy rejected the request.
- If no SecretGet event appears after the forced refresh, the request isn’t reaching the vault, which points away from the Key Vault RBAC assignment.
- If the correct identity reaches Key Vault successfully but App Service still reports AccessToKeyVaultDenied, the remaining evidence points to the App Service reference resolver or cached resolution state. This is an inference, not a documented root cause.
Also run the built-in Key Vault Application Settings Diagnostics detector under App Service → Diagnose and solve problems → Availability and Performance → Web app down. Microsoft specifically recommends this detector for unresolved Key Vault references.
If the logs confirm the correct principalId, an allowed network path, and repeated failures after a forced refresh, open an Azure support request for the Microsoft.Web resource provider. Include:
- App Service and Key Vault resource IDs
- UTC timestamps of the refresh attempt
- Current App Service principalId and tenant ID
- Key Vault SecretGet audit record and correlation ID
- Output of the config-reference status API
- Region, OS, and App Service plan
- Results from the App Service diagnostic detector
The Key Vault audit record is the decisive evidence needed before classifying it as a platform-side resolver issue.
References:
- App Service Key Vault References
- Azure Key Vault logging
- Key Vault REST error codes
- Troubleshoot Key Vault references
Help make this community better for everyone: If this answer helped or resolved your issue, please accept it or upvote it. If not, share more details in a comment so we can continue the discussion and find the right solution. Thank you.