You rotated a database password and updated the secret in Azure Key Vault. Your App Service uses a Key Vault Reference to load the secret. However, the app still uses the old password. What is the most likely cause and how do you fix it?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: Key Vault References cache the secret value. Restart the App Service to force a refresh.

App Service loads Key Vault Reference values at startup and caches them. When a secret is rotated, the app continues using the cached value until it is restarted. Restarting the Ap...

๐Ÿ“‹Part of Microsoft Certified: Azure Developer Associate (AZ-204) ยท Azure Certification Practice
Real Exam ScenarioAzure Key Vault

You rotated a database password and updated the secret in Azure Key Vault. Your App Service uses a Key Vault Reference to load the secret. However, the app still uses the old password. What is the most likely cause and how do you fix it?

โœ“ Correct Answer & ExplanationAzure Key Vault

Correct Answer

Key Vault References cache the secret value. Restart the App Service to force a refresh.

Why This Answer Is Correct

App Service loads Key Vault Reference values at startup and caches them. When a secret is rotated, the app continues using the cached value until it is restarted. Restarting the App Service (or using a deployment slot swap) forces it to re-read the new secret version from Key Vault.

๐Ÿ“š What This Question Tests

This question evaluates your knowledge of Azure Key Vault โ€” a core concept tested in Microsoft Certified: Azure Developer Associate (AZ-204). Understanding Azure Key Vault is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.