Your Azure App Service application reads a database password from Azure Key Vault at startup. You want to avoid storing any credentials in code or configuration. The app must access Key Vault without a client secret. What is the recommended approach?

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

Correct Answer: Enable System-Assigned Managed Identity on the App Service and grant it 'Key Vault Secrets User' role

Managed Identity eliminates credential management entirely. Enabling System-Assigned Managed Identity on the App Service creates an Azure AD identity for the app. Granting it the '...

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

Your Azure App Service application reads a database password from Azure Key Vault at startup. You want to avoid storing any credentials in code or configuration. The app must access Key Vault without a client secret. What is the recommended approach?

โœ“ Correct Answer & ExplanationAzure Key Vault

Correct Answer

Enable System-Assigned Managed Identity on the App Service and grant it 'Key Vault Secrets User' role

Why This Answer Is Correct

Managed Identity eliminates credential management entirely. Enabling System-Assigned Managed Identity on the App Service creates an Azure AD identity for the app. Granting it the 'Key Vault Secrets User' role allows the app to retrieve secrets using DefaultAzureCredential โ€” no passwords or keys stored anywhere.

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