Azure webapp for containers doesnt update the Keyvault secret values on app restart.

Jeeva 21 Reputation points
2025-04-30T09:54:33.07+00:00

We are running our backend in Azure webapp for containers and have a KeyVault secret references as one of the environment variable. As per the Azure documentation, these values are refreshed from keyvault every 24 hours.

Our issues is that this value should be updated in the container env var as soon as the value changes in the key vault. We tried the "Pull References Values" feature from the configuration tab which eventually updates and restarts after approximately 4 to 10 mins. After the restart it was updating the new value from the key vault. Now this feature seem to be flaky.

We restarted the webapp multiple times but that did not update the environment variables from the keyvault.

We have an automated deployment pipeline which deploys a new container image to the webapp and used az rest cli command to hit the appsettings/refresh endpoint then restarted the webapp which worked for a while now it doesn't

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,703 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.