Microsoft Azure Developer Associate AZ-204 Practice Question
An Azure Function app runs under a system-assigned managed identity. The app must upload blobs to the "reports" container for the next four hours. You need to generate a shared access signature (SAS) in code without using either of the storage account keys. What should you do?
Use the Azure Function host master key to sign a service SAS for the container at runtime.
Create a stored access policy on the container and generate a service SAS signed with the policy identifier so the policy can be revoked later.
Generate an account SAS with permissions cw and resource types co, then sign it by using the primary storage account key.
Call BlobServiceClient.GetUserDelegationKey, then build a BlobSasBuilder signed with the returned key before attaching the SAS to the blob URI.
A user delegation SAS is signed with Azure AD credentials instead of the storage account key. Because the Function app has a managed identity, it can authenticate to Azure Storage, call GetUserDelegationKey on BlobServiceClient, and obtain a user delegation key that is valid for the required time period. The key is then supplied to BlobSasBuilder to create a service-level SAS for the container or the target blob. The other options all rely on the account key (stored access policy, account SAS) or on an unrelated host key, so they do not satisfy the requirement to avoid using storage keys.
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 user delegation SAS in Azure Storage?
Open an interactive chat with Bash
How does Azure AD authentication work with managed identities?
Open an interactive chat with Bash
How does `BlobSasBuilder` help to create a SAS securely?
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 .