Question 991 of 997
Develop for Azure storageeasyMultiple ChoiceObjective-mapped

Quick Answer

The correct approach is to use a system-assigned managed identity with the RBAC role 'Storage Queue Data Contributor' on the queue. This works because a managed identity, automatically managed by Azure AD, provides your App Service with a secure service principal that can authenticate to Queue Storage without any stored secrets or connection strings. By assigning the Storage Queue Data Contributor role, you grant the identity precise permissions to read, write, and delete messages, while Azure handles credential rotation and lifecycle management. On the AZ-204 exam, this scenario tests your understanding of identity-based authentication versus key-based access, often appearing as a trap where candidates default to connection strings or access keys. The key distinction is that managed identities eliminate secret management entirely, making them the recommended pattern for Azure services. Memory tip: think "MIA" — Managed Identity Authenticates — and remember that the role name always includes the resource type (Queue) and the action (Data Contributor).

AZ-204 Develop for Azure storage Practice Question

This AZ-204 practice question tests your understanding of develop for azure storage. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Your application runs on Azure App Service and needs to access Azure Queue Storage. You want to avoid storing connection strings in configuration files. Which approach should you use?

Question 1easymultiple choice
Full question →

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

Use a system-assigned managed identity with RBAC role 'Storage Queue Data Contributor' on the queue.

Option B is correct because using a system-assigned managed identity for an Azure App Service allows it to authenticate to Azure Queue Storage without any stored secrets. By assigning the 'Storage Queue Data Contributor' RBAC role, the app gains the necessary permissions to read, write, and delete queue messages, and the identity is automatically managed by Azure AD, eliminating the need for connection strings.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Hardcode the connection string in the application code.

    Why it's wrong here

    Hardcoding credentials is a security risk.

  • Use a system-assigned managed identity with RBAC role 'Storage Queue Data Contributor' on the queue.

    Why this is correct

    Managed identity avoids storing credentials and provides secure access.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Use an environment variable in the App Service configuration.

    Why it's wrong here

    Environment variables are not secure.

  • Store the connection string in Azure Key Vault and retrieve it at runtime using Key Vault references.

    Why it's wrong here

    Key Vault references still require authentication to Key Vault.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often choose Key Vault references (Option D) thinking it's the most secure, but fail to recognize that managed identity eliminates the need for any secret at all, which is the true 'zero-trust' approach tested in AZ-204.

Detailed technical explanation

How to think about this question

Under the hood, a system-assigned managed identity creates a service principal in Azure AD tied to the App Service instance. The app uses the Azure Identity SDK (e.g., DefaultAzureCredential) to obtain an OAuth 2.0 token from the Azure Instance Metadata Service (IMDS) endpoint at 169.254.169.254, then passes that token to the Queue Storage REST API via the Authorization header. This approach is critical in scenarios like multi-tenant SaaS where connection string rotation across thousands of instances would be impractical.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related AZ-204 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AZ-204 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AZ-204 question test?

Develop for Azure storage — This question tests Develop for Azure storage — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Use a system-assigned managed identity with RBAC role 'Storage Queue Data Contributor' on the queue. — Option B is correct because using a system-assigned managed identity for an Azure App Service allows it to authenticate to Azure Queue Storage without any stored secrets. By assigning the 'Storage Queue Data Contributor' RBAC role, the app gains the necessary permissions to read, write, and delete queue messages, and the identity is automatically managed by Azure AD, eliminating the need for connection strings.

What should I do if I get this AZ-204 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This AZ-204 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-204 exam.