AZ-104 Deploy and Manage Azure Compute Practice Question
A web application runs in Azure App Service and uploads files to Azure Blob Storage. The storage account has shared key access disabled, and the app must not store secrets in configuration. If the App Service is deleted and recreated later, the storage access should be removed automatically with the app. What should you configure?
⚠ Common exam trap
The trap here is that candidates might choose a user-assigned managed identity (Option B) because it also avoids secrets, but they overlook the requirement that access must be automatically removed when the app is deleted, which only a system-assigned identity guarantees.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
A system-assigned managed identity with Blob Data Contributor permissions on the container.
A system-assigned managed identity is tied to the App Service lifecycle, so when the app is deleted, the identity is automatically removed, revoking access to Blob Storage. Granting Blob Data Contributor permissions on the container allows the app to upload files without storing any secrets, satisfying the requirement that shared key access is disabled and no secrets are stored in configuration.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
A system-assigned managed identity with Blob Data Contributor permissions on the container.
Why this is correct
A system-assigned managed identity is tied directly to the App Service instance and disappears when the app is deleted, which satisfies the automatic cleanup requirement. Because shared key access is disabled and secrets are not allowed in configuration, the app should authenticate through Microsoft Entra ID using the managed identity. Assigning Blob Data Contributor at the appropriate scope allows upload access without storing credentials.
- ✗
A user-assigned managed identity with Blob Data Reader permissions on the storage account.
Why it's wrong here
A user-assigned managed identity is an independent Azure resource that does not get deleted when the App Service is deleted, so it fails the requirement that all associated identities be automatically cleaned up. More fundamentally, Blob Data Reader only grants read and list operations; it does not allow uploads or writes, so the app could not actually upload files even if the identity were scoped perfectly. Additionally, assigning the identity at the storage account scope with only Reader permissions gives broader read access than needed while still lacking the write capability required for the upload scenario.
When this WOULD be correct
A user-assigned managed identity with Blob Data Reader permissions would be correct in a scenario where the app only needs to read blobs (e.g., a reporting tool that reads files) and the identity must be shared across multiple Azure resources (e.g., multiple App Services and a Function App) to avoid managing separate identities.
- ✗
A shared access signature generated from the storage account key.
Why it's wrong here
A shared access signature (SAS) generated from the storage account key is still a secret itself and requires shared key access to be enabled on the account. Since the scenario explicitly disables shared key access and forbids storing secrets in configuration, this approach cannot work. The SAS token would also need to be generated, delivered, and refreshed securely, and if leaked it grants access until it expires or the key is rotated, leaving a long-lived credential footprint to manage.
When this WOULD be correct
A question where the app needs to grant time-limited, delegated access to specific blobs or containers without using managed identities, and the app can securely generate SAS tokens at runtime using a stored access policy or user delegation key (e.g., from Azure AD). The scenario would not prohibit secret storage and would require granular, temporary access.
- ✗
A storage account access key stored in an application setting.
Why it's wrong here
A storage account access key stored in an application setting directly violates the scenario's requirement that no secrets be placed in configuration, and it is a static, long-lived credential that grants full data-plane access to the entire storage account, not just the target container. If the key is exposed through a misconfigured setting, debug endpoint, or deployment log, an attacker would have unrestricted read, write, and delete access to all blobs in the account. Rotating the key would require updating the app setting and restarting the service, whereas managed identity authentication requires no secret management at all and automatically rotates the underlying token.
When this WOULD be correct
If the question stated that shared key access is enabled and the app can securely store secrets (e.g., in Key Vault), then using a storage account access key in an application setting could be a valid approach for authentication.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.
✓A system-assigned managed identity with Blob Data Contributor permissions on the container.Correct answer▾
Why this is correct
A system-assigned managed identity is tied directly to the App Service instance and disappears when the app is deleted, which satisfies the automatic cleanup requirement. Because shared key access is disabled and secrets are not allowed in configuration, the app should authenticate through Microsoft Entra ID using the managed identity. Assigning Blob Data Contributor at the appropriate scope allows upload access without storing credentials.
✗A user-assigned managed identity with Blob Data Reader permissions on the storage account.Wrong answer — click to see why▾
Why this is wrong here
The question requires the app to upload files (write access), but Blob Data Reader only allows read access. Also, a user-assigned managed identity persists independently of the App Service lifecycle, so deleting the App Service would not automatically remove storage access.
★ When this WOULD be the correct answer
A user-assigned managed identity with Blob Data Reader permissions would be correct in a scenario where the app only needs to read blobs (e.g., a reporting tool that reads files) and the identity must be shared across multiple Azure resources (e.g., multiple App Services and a Function App) to avoid managing separate identities.
Why candidates choose this
Candidates may confuse user-assigned with system-assigned managed identities, or think that any managed identity automatically ties to the resource lifecycle, not realizing that user-assigned identities are separate resources.
✗A shared access signature generated from the storage account key.Wrong answer — click to see why▾
Why this is wrong here
Shared access signatures (SAS) require a secret (the storage account key or user delegation key) to generate, and the question states the app must not store secrets in configuration. Additionally, SAS tokens do not automatically revoke when the App Service is deleted unless a stored access policy is used, which still requires secret management.
★ When this WOULD be the correct answer
A question where the app needs to grant time-limited, delegated access to specific blobs or containers without using managed identities, and the app can securely generate SAS tokens at runtime using a stored access policy or user delegation key (e.g., from Azure AD). The scenario would not prohibit secret storage and would require granular, temporary access.
Why candidates choose this
Candidates may think SAS tokens are a secure, secret-free way to grant access because they can be generated without storing the account key in the app, but they still require a secret to generate and do not automatically revoke upon resource deletion.
✗A storage account access key stored in an application setting.Wrong answer — click to see why▾
Why this is wrong here
Shared key access is disabled, so storage account access keys cannot be used. Additionally, storing the key in an application setting violates the requirement to not store secrets in configuration.
★ When this WOULD be the correct answer
If the question stated that shared key access is enabled and the app can securely store secrets (e.g., in Key Vault), then using a storage account access key in an application setting could be a valid approach for authentication.
Why candidates choose this
Candidates may be familiar with using access keys for storage authentication and think storing them in app settings is a standard practice, overlooking the constraints of disabled shared key access and the no-secrets requirement.
Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Quick reference
Azure Blob Storage Tier Comparison
| Tier | Storage Cost | Retrieval Cost | Latency | Use Case |
|---|---|---|---|---|
| Hot | Highest | Lowest | Immediate | Active data, frequent reads |
| Cool | Lower | Higher | Immediate | Data accessed < once / month |
| Cold | Lower still | Higher | Immediate | Data accessed < once / quarter |
| Archive | Lowest | Highest + rehydration delay | Hours | Long-term compliance retention |
Go deeper
Related to this question
Learn chapter
Privileged Identity Management (PIM)
Key term
Blob
A blob is a large piece of unstructured data, like a photo or video, stored in the cloud with a unique identifier.
Key term
Container
A container is a lightweight, standalone software package that includes everything needed to run an application, such as code, runtime, system tools, and libraries.
About these practice questions
Courseiva writes every AZ-104 question from scratch — 1,049 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.