Skip to main content

AZ-104 practice question · Manage Azure identities and governance

You assign an Azure Policy definition with a deployIfNotExists effect that configures diagnostic settings on resources.

You assign an Azure Policy definition with a deployIfNotExists effect that configures diagnostic settings on resources. Resources created after the assignment get the settings, but resources that existed before the assignment still show as non-compliant. What should you do to bring the existing resources into compliance?

  • ACreate a remediation task for the assignment so its managed identity deploys the settings
  • BTrigger an on-demand compliance evaluation scan so the policy deploys the settings
  • CChange the policy effect to auditIfNotExists so the settings are added at next evaluation
  • DCreate a policy exemption for the existing resources so they are reconfigured automatically
Show the answer and explanation

Correct answer: A) Create a remediation task for the assignment so its managed identity deploys the settings

Policies with deployIfNotExists or modify effects act automatically only when resources are created or updated. To fix resources that already exist, you create a remediation task, which runs under the assignment's managed identity.

Why each option is right or wrong

  • A) Correct. For deployIfNotExists and modify policies, remediation tasks apply the policy's template or operations to existing non-compliant resources, and the assignment's managed identity performs the deployment.
  • B) Incorrect. An evaluation scan only refreshes compliance state. It does not deploy anything to existing resources. That requires a remediation task.
  • C) Incorrect. auditIfNotExists only reports that the related resource is missing. It never deploys configuration.
  • D) Incorrect. An exemption removes resources from evaluation and reporting. It does not configure them, so they stay without diagnostic settings.
Exam domain
Manage Azure identities and governance · 25% of AZ-104
Question type
Multiple choice (one answer)

Practise the full AZ-104 exam

This question is one of a small free sample from the CertRidge AZ-104 bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with Microsoft; never copied from the real exam.

Worth reading: AZ-104 passing score (700/1000), what 700 means on Microsoft's scaled score, and why it isn't 70%.