Microsoft Azure Developer Associate AZ-204 Practice Question
You are developing a .NET 6 App Service web app that must upload files to an Azure Storage account by using the Azure SDK. The solution must avoid storing any credentials in code, and the identity must remain available even if the web app is deleted and recreated in another region. What should you do?
Enable a system-assigned managed identity on the web app and grant it the Storage Blob Data Contributor role on the storage account.
Generate a service SAS token for the storage account and store the token in an App Service application setting.
Create an Azure AD application with a client secret, store the secret in Azure Key Vault, and retrieve it at runtime by using DefaultAzureCredential.
Create a user-assigned managed identity, assign it the Storage Blob Data Contributor role on the storage account, and associate the identity with the web app.
A user-assigned managed identity is a standalone Azure resource whose lifecycle is independent of any single host resource and can be attached to multiple services. Creating such an identity, granting it the Storage Blob Data Contributor role on the storage account, and then associating it with the web app meets all requirements. A system-assigned identity would be deleted with the web app, while solutions that rely on SAS tokens or application secrets violate the requirement to avoid storing credentials.
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 the difference between user-assigned and system-assigned managed identities in Azure?
Open an interactive chat with Bash
What is the Storage Blob Data Contributor role in Azure?
Open an interactive chat with Bash
How does DefaultAzureCredential work with Azure AD and 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 .