hardmultiple choiceObjective-mapped

A team operates two Azure VMs that both need to call Azure services with the same identity. The VMs are rebuilt frequently, and the identity must continue to work if either VM is deleted and recreated. Which identity should the administrator attach?

Question 1hardmultiple choice
Full question →

A team operates two Azure VMs that both need to call Azure services with the same identity. The VMs are rebuilt frequently, and the identity must continue to work if either VM is deleted and recreated. Which identity should the administrator attach?

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

A system-assigned managed identity on one of the VMs

System-assigned identities are bound to one specific VM and are removed with that VM.

B

Best answer

A user-assigned managed identity attached to both VMs

User-assigned identities are independent Azure resources that can be shared across VMs and survive VM recreation.

C

Distractor review

A service principal with a client secret stored on each VM

Client secrets create operational risk and fail the requirement to avoid stored credentials.

D

Distractor review

A certificate uploaded to each VM and used for Azure sign-in

Certificates still require lifecycle management and are not the cleanest shared identity approach here.

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: A user-assigned managed identity attached to both VMs — A user-assigned managed identity is the best choice because it is a standalone identity resource that can be attached to multiple Azure VMs. If either VM is deleted, the identity still exists and can be reattached to a replacement VM without changing permissions. This design also avoids embedded passwords, secrets, or certificates, which keeps the automation simple and more secure. Why others are wrong: A system-assigned identity is tied to one VM and disappears when that VM is deleted, so it does not meet the persistence requirement. A service principal with a secret violates the no-secrets constraint and adds rotation overhead. A certificate-based approach avoids a password, but it still requires manual lifecycle management and does not provide the same shared, reusable Azure-native identity behavior.

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.