Microsoft Azure Developer Associate AZ-204 Practice Question
You deploy an Azure App Service web app that must retrieve a connection string stored in Azure Key Vault during startup. You will use the Azure.Identity DefaultAzureCredential class in the application code. Before redeploying the code, which Azure portal action should you perform to make the retrieval succeed without client secrets?
Add the web app's outbound IP addresses to the Key Vault firewall and virtual networks settings.
Create a shared access signature (SAS) for the Key Vault and configure the web app to use the SAS token.
Enable a system-assigned managed identity for the web app and add an access policy in the Key Vault granting that identity Get and List secret permissions.
Register a new application in Microsoft Entra ID, generate a client secret, and store the secret in the web app's application settings.
DefaultAzureCredential will try to obtain a token from the hosting resource's managed identity when running in App Service. Enabling a system-assigned managed identity creates a service principal that represents the web app in Microsoft Entra ID. Granting that identity Get and List permissions on the Key Vault allows the SDK to exchange its token for the secret at runtime, eliminating the need to store any client ID or secret. Registering a separate app, modifying firewall rules, or using a Key Vault SAS do not let DefaultAzureCredential authenticate silently from App Service.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a system-assigned managed identity in Azure?
Open an interactive chat with Bash
How does the DefaultAzureCredential class handle authentication in Azure App Service?
Open an interactive chat with Bash
What are Key Vault access policies, and why are they needed for managed identities?
Open an interactive chat with Bash
Microsoft Azure Developer Associate AZ-204
Implement Azure security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .