Question 163 of 997
Implement Azure securitymediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is that the managed identity token is being requested with the wrong audience. When your app uses managed identity to access Azure Storage, it must explicitly request the token for the resource endpoint `https://storage.azure.com`; if it defaults to the Azure Resource Manager endpoint `https://management.azure.com`, the storage service rejects the token, causing a 403 error even though the role assignment is correct. On the AZ-204 exam, this scenario tests your understanding of how managed identity tokens are scoped—a common trap is assuming the role assignment alone guarantees access, but the token’s audience must match the target service. Remember that Azure Storage is not part of Azure Resource Manager for token purposes, so always specify the storage audience. A useful memory tip: “Storage needs its own stage”—the audience must be `https://storage.azure.com`, not the management endpoint.

AZ-204 Implement Azure security Practice Question

This AZ-204 practice question tests your understanding of implement azure security. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. 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 web app running on Azure App Service requires access to a storage account using managed identity. You enable the system-assigned managed identity on the App Service and assign the 'Storage Blob Data Contributor' role at the storage account scope. However, the app receives 403 errors when trying to read blobs. What is the most likely cause?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Question 1mediummultiple 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

The managed identity token is being requested with the wrong audience. You need to specify 'https://storage.azure.com' as the resource.

Option A is correct because when using managed identity with Azure Storage, the access token must be requested with the correct audience (resource). For Azure Blob Storage, the audience must be 'https://storage.azure.com'. If the app requests the token with a different audience (e.g., the default Azure Resource Manager endpoint 'https://management.azure.com'), the token will be rejected by the storage service, resulting in a 403 error despite the role assignment being in place.

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.

  • The managed identity token is being requested with the wrong audience. You need to specify 'https://storage.azure.com' as the resource.

    Why this is correct

    App Service's default token endpoint uses Azure Resource Manager audience; storage requires a specific audience.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Managed identity is not supported for Azure App Service; use a connection string instead.

    Why it's wrong here

    Managed identity is fully supported for App Service.

  • The role assignment has not propagated yet; wait 30 minutes.

    Why it's wrong here

    Role propagation is fast and not the cause of persistent 403 errors.

  • The storage account has a firewall rule that blocks the App Service outbound IPs.

    Why it's wrong here

    A firewall rule would cause a different error (e.g., 403 from network policy).

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates assume the role assignment alone is sufficient, overlooking that the token's audience must match the target service (storage vs. management), which is a subtle but critical detail in managed identity authentication flows.

Detailed technical explanation

How to think about this question

Under the hood, the managed identity endpoint at 169.254.169.254/metadata/identity/oauth2/token returns tokens for a specific resource. If the resource parameter is omitted or set incorrectly (e.g., 'https://management.azure.com'), the token will have an 'aud' claim that the storage service does not recognize. The Azure Storage SDKs automatically set the correct audience when using DefaultAzureCredential, but if you manually acquire the token (e.g., via REST call or older libraries), you must explicitly specify 'https://storage.azure.com' as the resource. This is a common pitfall when migrating from connection strings to managed identity.

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?

Implement Azure security — This question tests Implement Azure security — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The managed identity token is being requested with the wrong audience. You need to specify 'https://storage.azure.com' as the resource. — Option A is correct because when using managed identity with Azure Storage, the access token must be requested with the correct audience (resource). For Azure Blob Storage, the audience must be 'https://storage.azure.com'. If the app requests the token with a different audience (e.g., the default Azure Resource Manager endpoint 'https://management.azure.com'), the token will be rejected by the storage service, resulting in a 403 error despite the role assignment being in place.

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.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

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.