AZ-104 Manage Azure Identities and Governance Practice Question
A subscription must block creation of resources in any region except East US and West US, and the security team also wants a nonblocking report of existing resources that are missing a CostCenter tag. Which two Azure Policy effects should you use? Select two.
⚠ Common exam trap
Watch out — candidates often confuse Audit (which only reports) with DeployIfNotExists or Modify (which actively remediate), leading them to select a remediation effect when the question explicitly asks for a nonblocking report.
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
✓
Deny
Deny is correct because it actively blocks resource creation in regions outside East US and West US by evaluating the location property against an allowed list and rejecting non-compliant requests at deployment time. Audit is correct because it logs a compliance event for existing resources missing the CostCenter tag without blocking any operations, providing a nonblocking report for the security team.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Deny
Why this is correct
Deny is the correct effect to enforce a hard block on disallowed regions: Azure Policy evaluates the incoming create or update request and returns a 403 Forbidden for any noncompliant resource, so the deployment is stopped before any resource is provisioned. It works with the resource's `location` property at request time, making it ideal for a subscription-level mandate to reject resources in any region outside the approved geographies. Unlike audit-only effects, Deny prevents the noncompliant resource from existing at all.
- ✓
Audit
Why this is correct
Audit records a noncompliance entry in the Azure activity log and marks the resource as noncompliant, but does not block the underlying operation, so the resource is still created or modified. This makes Audit the appropriate effect when the goal is reporting, such as identifying existing VMs that lack the required `CostCenter` tag, without shutting down or preventing those resources. Because it does not interfere with existing workloads, Audit is often used as a first step before enforcing a Deny effect.
- ✗
Modify
Why it's wrong here
Modify effect applies a predefined tag or property change to a resource during the deployment operation by invoking the resource provider's update API, but it can only alter supported mutable properties such as tags or SKU. It cannot change a resource's `location` object or prevent a deployment because its purpose is to rewrite values, not to stop the request based on an evaluation condition. A location-based block requires the Deny effect's pre-provisioning interception, not a post-validation property write, so Modify is not applicable to this scenario.
When this WOULD be correct
Use Modify when you need to automatically add or change a tag (e.g., CostCenter) on existing or newly created resources to enforce compliance, such as ensuring all resources have a required tag value.
- ✗
DeployIfNotExists
Why it's wrong here
DeployIfNotExists is a remediation effect that runs a secondary ARM template deployment after the evaluated resource is created or updated, which means it is fundamentally unable to prevent a resource from being deployed in the first place. It is designed to fix missing child resources or configurations—like attaching a Network Security Group to a NIC or enabling diagnostic settings—not to reject a deployment based on region. Since the disallowed-region VM would already exist by the time DeployIfNotExists runs, it cannot satisfy a requirement to block creation.
When this WOULD be correct
DeployIfNotExists would be correct if the requirement was to automatically deploy a CostCenter tag with a default value to any existing resource that lacks it, and the policy should also evaluate and remediate non-compliant resources.
- ✗
Disabled
Why it's wrong here
Disabled effect effectively switches off the policy definition, so Azure Policy does not evaluate any resources for this definition and no compliance result—or enforcement action—is produced. It is intended for testing a policy rule or temporarily deactivating a definition without deleting it, and it would leave the subscription open to resources created in any region. Using Disabled would completely fail the stated requirement to block disallowed regions, making it the least appropriate choice.
When this WOULD be correct
If a question asks you to temporarily deactivate a policy without deleting it (e.g., during maintenance or testing), you would set the policy effect to Disabled.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.
✓DenyCorrect answer▾
Why this is correct
Deny is the correct effect to enforce a hard block on disallowed regions: Azure Policy evaluates the incoming create or update request and returns a 403 Forbidden for any noncompliant resource, so the deployment is stopped before any resource is provisioned. It works with the resource's `location` property at request time, making it ideal for a subscription-level mandate to reject resources in any region outside the approved geographies. Unlike audit-only effects, Deny prevents the noncompliant resource from existing at all.
✗ModifyWrong answer — click to see why▾
Why this is wrong here
Modify effect automatically changes non-compliant resources, but the requirement is to block creation in disallowed regions and only report missing CostCenter tags without remediation.
★ When this WOULD be the correct answer
Use Modify when you need to automatically add or change a tag (e.g., CostCenter) on existing or newly created resources to enforce compliance, such as ensuring all resources have a required tag value.
Why candidates choose this
Candidates may think Modify can both block and auto-correct, but it doesn't block creation; it only alters resources after creation, and the question explicitly wants a nonblocking report for missing tags.
✗DeployIfNotExistsWrong answer — click to see why▾
Why this is wrong here
DeployIfNotExists is used to deploy resources (like a policy remediation task) when a non-compliant resource exists, but the requirement is only to report (non-blocking) missing CostCenter tags, not to automatically deploy a tag or resource.
★ When this WOULD be the correct answer
DeployIfNotExists would be correct if the requirement was to automatically deploy a CostCenter tag with a default value to any existing resource that lacks it, and the policy should also evaluate and remediate non-compliant resources.
Why candidates choose this
Candidates may confuse DeployIfNotExists with Audit, thinking it can both report and automatically fix missing tags, but the question explicitly asks for a non-blocking report, not remediation.
✗DisabledWrong answer — click to see why▾
Why this is wrong here
The Disabled effect turns off a policy definition entirely, so it cannot block resource creation in restricted regions or generate a nonblocking report of untagged resources.
★ When this WOULD be the correct answer
If a question asks you to temporarily deactivate a policy without deleting it (e.g., during maintenance or testing), you would set the policy effect to Disabled.
Why candidates choose this
Candidates may think 'Disabled' is a valid effect for a policy that should not enforce anything, but the question requires both blocking and auditing, which need active effects.
Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Go deeper
Related to this question
Learn chapter
Managed Identities for Azure Resources
Key term
Security
Security in IT is the practice of protecting systems, networks, and data from unauthorized access, damage, or theft.
Key term
Azure Policy
Azure Policy is a service in Microsoft Azure that lets you create, assign, and manage rules to ensure your resources stay compliant with your company standards and service-level agreements.
About these practice questions
This AZ-104 question is part of Courseiva's 1,049-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-104 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-104 exam.