hardmultiple choiceObjective-mapped

An Azure CLI script runs on a utility VM every night to create and tag resources in another subscription. The script cannot store a password or client secret, and the VM is regularly redeployed from a standard image. What is the best identity design?

Question 1hardmultiple choice
Full question →

An Azure CLI script runs on a utility VM every night to create and tag resources in another subscription. The script cannot store a password or client secret, and the VM is regularly redeployed from a standard image. What is the best identity design?

Answer choices

Why each option matters

Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.

A

Distractor review

Assign a system-assigned managed identity to the utility VM

A system-assigned identity is removed if the VM is deleted and cannot be shared elsewhere.

B

Best answer

Create a user-assigned managed identity and attach it to the utility VM

A user-assigned identity persists independently of the VM and can be reused after redeployment.

C

Distractor review

Create a service principal and store its secret in the VM configuration

A stored secret violates the requirement to avoid passwords and client credentials on the VM.

D

Distractor review

Use a shared access signature to sign the Azure CLI session

SAS tokens are for specific storage operations, not general Azure resource deployment authorization.

Common exam trap

Common exam trap: NAT rules depend on direction and matching traffic

NAT is not only about the public address. The inside/outside interface roles and the ACL or rule that matches traffic are just as important.

Technical deep dive

How to think about this question

NAT questions usually test address translation, overload/PAT behaviour, static mappings and whether the right traffic is being translated. Read the interface direction and address terms carefully.

KKey Concepts to Remember

  • Static NAT maps one inside address to one outside address.
  • PAT allows many inside hosts to share one public address using ports.
  • Inside local and inside global describe the private and translated addresses.
  • NAT ACLs identify traffic for translation, not always security filtering.

TExam Day Tips

  • Identify inside and outside interfaces first.
  • Check whether the scenario needs static NAT, dynamic NAT or PAT.
  • Do not confuse NAT matching ACLs with normal packet-filtering intent.

Related practice questions

Related AZ-104 practice-question pages

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

More questions from this exam

Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.

FAQ

Questions learners often ask

What does this AZ-104 question test?

Static NAT maps one inside address to one outside address.

What is the correct answer to this question?

The correct answer is: Create a user-assigned managed identity and attach it to the utility VM — The best design is a user-assigned managed identity attached to the utility VM. That identity remains available even if the VM is redeployed, which is important when the compute host is frequently recreated. The script can authenticate to Azure with the VM identity and then use role assignments on the target subscription or resource group, eliminating the need to store secrets on the machine. Why others are wrong: A system-assigned identity is too tightly coupled to the VM lifecycle and is less reusable after redeployment. A service principal with a secret fails the no-secrets requirement and adds rotation overhead. SAS tokens do not grant general ARM deployment permissions, so they are the wrong control for creating and tagging Azure resources.

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

Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.

Discussion

Loading comments…

Sign in to join the discussion.