Microsoft Azure Developer Associate AZ-204 Practice Question
You are developing an ASP.NET Core 6.0 web API that will be deployed to Azure App Service. The app has a system-assigned managed identity. A secret named DbConnection is stored in Azure Key Vault. You need to load the secret into the app's configuration at startup without hard-coding any credentials. Which code statement should you add?
The Azure.Extensions.AspNetCore.Configuration.Secrets package provides the AddAzureKeyVault extension, which loads secrets directly into IConfiguration. Passing the vault URI and a DefaultAzureCredential instance allows the SDK to obtain a token through the app's system-assigned managed identity when running in Azure, so no credentials are embedded in code. User secrets, environment variables, and JSON files all require storing the connection string elsewhere and do not pull it from Key Vault automatically.
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 App Service?
Open an interactive chat with Bash
How does DefaultAzureCredential work in Azure SDK?
Open an interactive chat with Bash
What are Azure Key Vault secrets and why use them?
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 .