Hi @Lilach Davis , thank you for your info that your issue has been resolved. Here's the summary of issue and solution.
Issue:
- Linux Web App on App Service with vnet integration.
- Azure Key Vault (KV) in the same subscription, configured with network restrictions.
- Web App is using KV references as app’s environment variables.
- KV was configured with a RBAC permission model, and the App’s managed identity was given a Key Vault Secrets User role for it.
- Right after its deployment, the App was successfully pulling the secret values from the KV.
- After about an hour, when checked, the App was no longer able to access the KV, showing an error message:
AccessToKeyVaultDenied. Key Vault reference was not able to be resolved because site was denied access to Key Vault reference's vault.
- Same scenario happens (successful pull of secrets then error after an hour) after KV is changed from RBAC to Access Policy.
- Same scenario happens after Private Endpoint is configured for KV.
Solution:
- The issue is now resolved, although we haven't changed anything. Suspect a temporary bug in Azure.
Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.