A developer hardcoded database connection strings (including passwords) directly in their application's appsettings.json, which is committed to source control. You need to remediate this security issue. What is the recommended Azure approach to inject secrets into the application without code changes?

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

Correct Answer: Store secrets in Azure Key Vault and use the Azure App Configuration provider or Key Vault references in App Service application settings to inject them at runtime

Azure Key Vault References allow App Service and Azure Functions to reference secrets stored in Key Vault directly in application settings (using @Microsoft.KeyVault(...) syntax). ...

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

A developer hardcoded database connection strings (including passwords) directly in their application's appsettings.json, which is committed to source control. You need to remediate this security issue. What is the recommended Azure approach to inject secrets into the application without code changes?

โœ“ Correct Answer & ExplanationAzure Key Vault

Correct Answer

Store secrets in Azure Key Vault and use the Azure App Configuration provider or Key Vault references in App Service application settings to inject them at runtime

Why This Answer Is Correct

Azure Key Vault References allow App Service and Azure Functions to reference secrets stored in Key Vault directly in application settings (using @Microsoft.KeyVault(...) syntax). The application receives the resolved secret value at runtime without any code changes.

๐Ÿ“š 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.