hardmulti selectObjective-mapped

An Azure Automation account is recreated periodically during a migration project. Runbooks must authenticate to Azure resources without embedded secrets, and the identity must continue to work after the account is rebuilt. Which two choices should you make? Select two.

Question 1hardmulti select
Full question →

An Azure Automation account is recreated periodically during a migration project. Runbooks must authenticate to Azure resources without embedded secrets, and the identity must continue to work after the account is rebuilt. Which two choices should you make? Select two.

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

Best answer

Use a user-assigned managed identity so the identity is independent of the Automation account lifecycle.

A user-assigned managed identity is not tied to one specific Automation account instance. That makes it resilient when the account is recreated during migration or recovery activities. It also avoids storing passwords or secrets in the runbook, which satisfies the secure automation requirement.

B

Best answer

Grant the managed identity the required Azure RBAC roles on the target resources or resource groups.

An identity without permissions still cannot perform the work, so role assignment is required. Granting only the needed RBAC roles keeps the solution secure and operational. This is the proper way to authorize a secretless automation identity in Azure.

C

Distractor review

Use a service principal with a client secret stored in an encrypted Automation variable.

Although this can work technically, it still stores a long-lived secret that must be protected and rotated. The requirement explicitly says to avoid embedded credentials, so this approach does not meet the security goal.

D

Distractor review

Use a system-assigned managed identity attached to the Automation account because it is always reusable after recreation.

A system-assigned managed identity is lifecycle-bound to the resource that owns it. If the Automation account is rebuilt, the identity changes as well, which breaks the requirement for continuity across recreation. That makes this option unsuitable here.

E

Distractor review

Store a storage account key in a runbook asset and retrieve it at runtime.

A storage account key is a secret and behaves like a password. Storing it in a runbook asset still leaves you managing credentials, rotation, and exposure risk. This directly conflicts with the requirement to avoid embedded secrets.

Common exam trap

Common exam trap: answer the scenario, not the keyword

Many certification questions include familiar terms but test a specific constraint. Read the exact wording before choosing an answer that is generally true but wrong for this case.

Technical deep dive

How to think about this question

This question should be treated as a scenario, not a definition check. Identify the problem, the constraint and the best action. Then compare each option against those facts.

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.
  • Use explanations to understand the rule behind the answer.

TExam Day Tips

  • Underline the problem statement mentally.
  • 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.

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?

Read the scenario before looking for a memorised answer.

What is the correct answer to this question?

The correct answer is: Use a user-assigned managed identity so the identity is independent of the Automation account lifecycle. — The safest and most resilient design is to use a user-assigned managed identity and grant that identity the needed RBAC roles. A user-assigned identity survives resource recreation, which is exactly what the scenario needs. Because the identity is managed by Azure, the runbook can authenticate without embedding secrets, certificates, or keys, making the automation both durable and secure. Why others are wrong: Service principals with secrets and stored keys still rely on credentials that must be protected and rotated. A system-assigned identity is tied to the Automation account, so it is not ideal when the account is rebuilt. Those choices fail either the secretless requirement or the lifecycle requirement.

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.