SC-900Chapter 90 of 103Objective 4.1

Azure Policy Effects: Audit, Deny, Modify

This chapter covers Azure Policy effects—specifically Audit, Deny, and Modify—which are central to enforcing compliance in Azure. For the SC-900 exam, understanding these effects is critical because questions on policy effects appear in roughly 10-15% of the compliance section. You must know not only what each effect does but also when to use it and how it interacts with other Azure governance tools like Azure Blueprints and Management Groups. We will dissect each effect's mechanism, configuration, and exam traps.

25 min read
Intermediate
Updated May 31, 2026

Policy Effects as Security Guards

Imagine a corporate building with three types of security guards at the entrance. The first guard, 'Audit,' simply records every person who enters, their ID, and the time, but never stops anyone. He writes everything in a logbook that management reviews later. The second guard, 'Deny,' stands firm and blocks anyone who doesn't have a valid badge. He doesn't care about intent—if the badge is missing or expired, the person is turned away immediately. The third guard, 'Modify,' is like a tailor. If someone's badge is slightly incorrect (e.g., missing a sticker), the guard adds the sticker and lets them in, but logs the change. These guards correspond to Azure Policy effects: Audit logs non-compliant resources without blocking them, Deny prevents creation or modification of non-compliant resources, and Modify automatically fixes non-compliant resources using a 'deployIfNotExists' or 'modify' effect. Just as the building's security policy defines which badges are valid, Azure Policy defines rules, and effects determine the guard's action. The logbook is like Azure Activity Log or Resource Manager logs, and the tailor's modifications are tracked via remediation tasks.

How It Actually Works

What Are Azure Policy Effects?

Azure Policy is a service in Azure that allows you to create, assign, and manage policies. These policies enforce different rules and effects over your resources, ensuring that resources stay compliant with your corporate standards and service level agreements. An effect is the behavior that Azure Policy takes when a resource is evaluated against a policy definition. The three primary effects—Audit, Deny, and Modify—are the focus of this chapter, but Azure Policy also includes other effects like Append, DeployIfNotExists, AuditIfNotExists, and Disabled. For SC-900, you need to understand the core three in depth.

Why Do Effects Matter?

Effects are the teeth of Azure Policy. Without effects, a policy is just a statement. Effects determine whether non-compliant resources are simply logged (Audit), blocked from creation or update (Deny), or automatically corrected (Modify). The choice of effect directly impacts your compliance posture and operational overhead. For example, using Deny can prevent security misconfigurations from ever being deployed, but it may block legitimate development if too restrictive. Audit allows you to detect issues without disruption, while Modify automates remediation.

How Azure Policy Evaluation Works Internally

Azure Policy evaluates resources during two main events: resource creation or update (triggered by Azure Resource Manager) and periodic compliance evaluation (every 24 hours by default). The evaluation engine checks each resource against all assigned policy definitions. For each policy, the engine determines which effect applies based on conditions defined in the policy rule. The evaluation order matters: if multiple policies assign different effects to the same resource, the most restrictive effect typically wins. Specifically, Deny overrides Audit and Modify, and Modify overrides Audit. If a policy with Deny effect is violated, the resource creation/update is rejected with an HTTP 403 (Forbidden) status code. If a policy with Audit effect is violated, the resource is created/updated but flagged as non-compliant in the compliance dashboard. Modify effect triggers a remediation task if the resource is non-compliant, which can automatically update the resource.

Audit Effect

The Audit effect is the least intrusive. It activates when a resource is non-compliant and logs a warning event in the activity log, but it does not block the request. Audit is ideal for scenarios where you want to know about non-compliance without impacting operations. For example, you might use Audit to track which storage accounts do not have HTTPS-only transfer enabled. The evaluation result is stored in the compliance state of the resource, and you can view it in the Azure Policy compliance dashboard. Audit does not trigger any automatic remediation. It is important to note that Audit does not create a denial; it merely reports. The audit event is written to the activity log with a severity of 'Warning' and a category of 'Policy'.

Deny Effect

The Deny effect is the strictest. It prevents a resource from being created or updated if the resource is non-compliant. The denial occurs at the Azure Resource Manager level, before the resource is provisioned. When a user attempts to create or update a resource that violates a Deny policy, the request fails with an error message indicating the policy that was violated. This effect is commonly used to enforce security baselines, such as requiring all managed disks to use encryption at rest. Deny can be applied to properties like location, SKU, tags, or any other property that can be evaluated. One key nuance: Deny only applies to create and update operations; it does not affect existing resources. Existing non-compliant resources are flagged as non-compliant, but they are not deleted. To remediate existing resources, you must combine Deny with a remediation effect like Modify or DeployIfNotExists, or manually fix them.

Modify Effect

The Modify effect is used to automatically correct non-compliant resources during creation or update, or via a remediation task. Modify can add, update, or remove properties of a resource. For example, you can create a policy that automatically adds a specific tag to resources if it is missing. Modify works by defining a 'modify' operation in the policy definition, which specifies the property to change and the new value. When a resource is created or updated, the Modify effect runs after the resource is provisioned but before the operation is considered complete. If the resource is non-compliant, the modification is applied. For existing resources, you can trigger a remediation task that scans all resources in scope and applies the modification. Modify is often used in conjunction with Deny to enforce a 'guardrail' approach: Deny blocks blatant violations, while Modify fixes minor ones automatically.

Key Configuration Elements

All policy effects are defined within a policy definition's JSON. Here is an example of a policy definition using the Deny effect:

{
  "if": {
    "field": "type",
    "equals": "Microsoft.Compute/virtualMachines"
  },
  "then": {
    "effect": "deny"
  }
}

For Modify, the 'then' block includes a 'details' section with the role definition IDs needed for remediation and the operations:

{
  "if": {
    "field": "tags['costCenter']",
    "exists": "false"
  },
  "then": {
    "effect": "modify",
    "details": {
      "roleDefinitionIds": [
        "/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"
      ],
      "operations": [
        {
          "operation": "add",
          "field": "tags['costCenter']",
          "value": "default"
        }
      ]
    }
  }
}

For Audit, the 'then' block simply specifies:

"then": {
  "effect": "audit"
}

Interaction with Other Azure Services

Azure Policy effects integrate with Azure Management Groups, Subscriptions, and Resource Groups. Policies can be assigned at any scope, and effects propagate down. For example, a Deny policy assigned at a Management Group applies to all subscriptions under it. Azure Policy also integrates with Azure Blueprints, where policies can be included as artifacts. Blueprints assign policies to subscriptions during blueprint assignment. Additionally, Azure Policy works with Azure RBAC: to perform remediation, the policy assignment needs a managed identity with appropriate permissions (e.g., Contributor role on the resource scope). The Modify effect requires the policy assignment's managed identity to have the necessary role to modify the resource.

Evaluation Order and Conflict Resolution

When multiple policies apply to the same resource, the evaluation order is alphabetical by policy name, but the effect precedence is: Deny > Modify > Audit. If a Deny policy evaluates to non-compliant, the resource is denied regardless of other policies. If no Deny applies, a Modify effect can run. Audit only logs if no other effect takes action. This precedence ensures that the most restrictive effect wins. For example, if you have an Audit policy that checks for tags and a Modify policy that adds missing tags, the Modify effect will run first (if the resource is non-compliant) and then the Audit policy will see the resource as compliant (after modification). However, if a Deny policy blocks the resource entirely, Modify never runs.

Remediation and Compliance States

For Modify and DeployIfNotExists effects, you can create remediation tasks to fix existing non-compliant resources. Remediation tasks run asynchronously and can be triggered manually or on a schedule. The compliance state of a resource can be: Compliant, Non-compliant, Conflicting, Error, or Not started. Audit and Deny policies set the compliance state based on evaluation. Modify policies set compliance state after modification. It is possible for a resource to be compliant with one policy but non-compliant with another. The overall compliance state of a resource is the worst state across all policies.

Common Exam Scenarios

The SC-900 exam tests your ability to choose the correct effect for a given scenario. For example: "You need to ensure that all storage accounts have HTTPS-only transfer enabled. You want to prevent creation of non-compliant storage accounts." Answer: Deny. "You want to be notified when a storage account is created without HTTPS, but you don't want to block it." Answer: Audit. "You want to automatically add a tag to all resources that are missing it." Answer: Modify. Also know that Deny can be overridden by exemptions, but that is a separate topic.

Summary of Effects

Audit: Logs non-compliance, does not block. Use for monitoring and discovery.

Deny: Blocks creation/update of non-compliant resources. Use for strict enforcement.

Modify: Automatically fixes non-compliant resources during creation/update or via remediation. Use for auto-remediation.

Each effect has its place in a comprehensive governance strategy. On the exam, be prepared to identify which effect meets a given requirement, especially when the requirement includes words like 'prevent', 'log', or 'automatically correct'.

Walk-Through

1

Define the policy rule

Start by creating a policy definition in JSON. The rule has an 'if' condition that specifies which resources to evaluate and a 'then' block that specifies the effect. For example, to deny creation of VMs in a specific region, the condition checks the 'location' field. The effect is set to 'deny'. This step requires understanding of Azure Resource Manager resource properties and aliases. The policy definition is stored as a resource of type Microsoft.Authorization/policyDefinitions.

2

Assign the policy at scope

Assign the policy definition to a management group, subscription, or resource group. During assignment, you can set parameters (e.g., list of allowed locations) and exclude scopes. The assignment also creates a managed identity if the policy uses Modify or DeployIfNotExists effects. The assignment is a resource of type Microsoft.Authorization/policyAssignments. The scope determines which resources are evaluated.

3

Resource creation or update triggered

When a user or application sends a request to create or update a resource via Azure Resource Manager (ARM), the request passes through the policy evaluation engine before the resource is provisioned. ARM intercepts the request and evaluates all policy assignments that apply to the resource's scope. The evaluation is synchronous for Deny and Audit effects, meaning the response is sent only after evaluation completes.

4

Policy evaluation and effect execution

The policy engine evaluates the 'if' condition for each applicable policy. If the condition is true (resource is non-compliant), the 'then' effect is executed. For Deny, the request is rejected with HTTP 403 and an error message containing the policy name and reason. For Audit, the request proceeds but a warning event is logged in the activity log. For Modify, the engine applies the specified modifications to the resource before it is created/updated; this happens after the resource is provisioned but before the operation is considered complete.

5

Compliance state update and logging

After the operation, the compliance state of the resource is updated. For Deny, the resource is not created, so no compliance state is recorded. For Audit, the resource is created but marked as non-compliant. For Modify, the resource becomes compliant (if the modification fixed the issue). The compliance state is visible in the Azure Portal's Policy compliance dashboard. Additionally, all policy evaluation events are logged in the activity log under 'Policy' category.

6

Remediation (if applicable)

For Modify and DeployIfNotExists effects, you can trigger a remediation task to fix existing non-compliant resources. The remediation task scans all resources in the assignment scope, evaluates the policy condition, and applies the modification for non-compliant resources. Remediation tasks run asynchronously and can be scheduled or triggered manually. They require the policy assignment's managed identity to have appropriate permissions on the resources. The progress is tracked in the Remediation tasks blade.

What This Looks Like on the Job

Enterprise Scenario 1: Enforcing Resource Tagging

A large enterprise with multiple business units uses Azure Policy to enforce tagging standards. They require that all resources have a 'costCenter' tag. They use a combination of Deny and Modify effects. A Deny policy blocks creation of new resources without the tag, preventing untagged resources from being deployed. However, they also have many existing untagged resources. To fix these, they assign a Modify policy that automatically adds the 'costCenter' tag with a default value 'unknown' to any resource missing it. They then run a remediation task to apply the modification to all existing non-compliant resources. The Deny policy ensures no new untagged resources appear, while Modify cleans up the backlog. The challenge is managing the managed identity permissions: the Modify policy's identity needs Contributor access to all resource groups in scope. They use a custom role with minimal permissions to avoid over-privilege.

Enterprise Scenario 2: Restricting VM SKUs for Cost Control

A cloud center of excellence team wants to prevent deployment of expensive VM sizes (e.g., Standard_DSv5) in non-production subscriptions. They create a Deny policy that blocks any VM with a SKU that is not in an allowed list. The policy is assigned at the management group level covering all non-production subscriptions. When a developer tries to create a large VM, the request is denied with a clear error message. This prevents cost overruns. However, they also use an Audit policy to report any existing VMs with disallowed SKUs, so they can manually migrate or resize them. The Deny effect is critical because it proactively prevents non-compliant resources. A common issue is that the policy might block legitimate requests if the allowed list is too restrictive, so they maintain a process to update the list via parameter changes.

Enterprise Scenario 3: Automatically Enabling Encryption on Storage Accounts

A financial services company must ensure all storage accounts have encryption at rest enabled (which is default, but they want to enforce it). They use a Deny policy to prevent creation of storage accounts with encryption disabled (though Azure defaults to enabled, a user could disable it). Additionally, they use an Audit policy to detect any existing storage accounts that have encryption disabled. Because encryption is a critical security requirement, they also use a Modify policy to automatically enable encryption on any storage account that is created without it (though this is rare). The Modify effect is configured to set the 'properties.encryption.services.blob.enabled' property to true. They run a remediation task quarterly to catch any drift. The key lesson is that Deny is not enough for existing resources, so Audit and Modify cover detection and remediation. Performance is not a concern because policy evaluation is fast, but remediation tasks can take time for large numbers of resources.

How SC-900 Actually Tests This

What SC-900 Tests on This Topic

The SC-900 exam objective 4.1: 'Describe the capabilities of Azure Policy.' Specifically, you need to understand the effects: Audit, Deny, Modify, Append, DeployIfNotExists, AuditIfNotExists, and Disabled. The exam focuses on when to use each effect. Expect scenario-based questions where you must choose the correct effect based on a requirement. Also, know that Deny is the most restrictive and Audit is the least. The exam does not require you to write policy JSON, but you should recognize the structure and know that effects are defined in the 'then' block.

Common Wrong Answers and Why Candidates Choose Them

1.

Choosing Audit when the requirement says 'prevent': Many candidates see 'monitor' or 'log' and think Audit, but if the requirement says 'prevent creation', the correct effect is Deny. The trap is that Audit only logs, it does not block.

2.

Choosing Deny when the requirement says 'automatically fix': Candidates may think Deny is the strongest, but Deny only blocks; it does not fix existing resources. For auto-remediation, use Modify or DeployIfNotExists.

3.

Confusing Modify with Append: Append adds a field only if it doesn't exist, while Modify can add, update, or remove fields. The exam may test that Modify is more flexible. Append is limited to adding to arrays or objects.

4.

Thinking Deny applies to existing resources: Deny only applies during resource creation or update. Existing non-compliant resources are not affected by Deny. This is a common trap.

Specific Numbers and Terms

The default compliance evaluation cycle is 24 hours.

Deny returns HTTP status 403.

Modify requires a managed identity with appropriate role assignments.

Remediation tasks can be triggered manually or on a schedule.

The 'effect' property is case-sensitive: 'deny', 'audit', 'modify'.

Edge Cases the Exam Loves

What happens when two policies have conflicting effects? Answer: Deny takes precedence over Modify and Audit.

Can a policy with Deny effect be overridden? Only via an exemption (which is a separate concept).

What if a Modify policy fails due to permissions? The resource creation/update proceeds without modification, and the resource is marked non-compliant.

Can Audit effect be used on existing resources? Yes, it evaluates existing resources during periodic compliance scans.

How to Eliminate Wrong Answers

If the requirement includes 'prevent', 'block', or 'deny', the correct effect is Deny.

If the requirement includes 'log', 'monitor', or 'report', the correct effect is Audit.

If the requirement includes 'automatically correct', 'fix', or 'add tag', the correct effect is Modify or DeployIfNotExists.

If the requirement is about existing resources and you need to fix them, you need a remediation effect (Modify or DeployIfNotExists) combined with a remediation task.

Memorize the precedence: Deny > Modify > Audit.

Key Takeaways

Audit effect logs non-compliance without blocking; use for monitoring.

Deny effect blocks creation/update of non-compliant resources; use for prevention.

Modify effect automatically fixes non-compliant resources; use for auto-remediation.

Deny takes precedence over Modify and Audit when multiple policies apply.

Remediation tasks are required to fix existing resources with Modify or DeployIfNotExists.

Policy evaluation occurs during resource creation/update and every 24 hours.

Deny returns HTTP 403 Forbidden with policy details.

Modify requires a managed identity with appropriate RBAC roles on the target scope.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

Audit Effect

Logs non-compliance but does not block resource creation/update.

Resource is created/updated successfully.

Compliance state set to Non-compliant.

Ideal for monitoring and discovery.

Least restrictive effect.

Deny Effect

Blocks resource creation/update if non-compliant.

Resource creation/update fails with HTTP 403.

No resource is created, so no compliance state.

Ideal for strict enforcement of security/compliance.

Most restrictive effect.

Modify Effect

Can add, update, or remove properties.

Works on any modifiable property.

Requires managed identity with permissions.

Can remediate existing resources via tasks.

More flexible than Append.

Append Effect

Only adds fields if they don't exist.

Limited to adding to arrays or objects.

Does not require managed identity (but may need permissions for the resource).

No remediation for existing resources.

Less flexible, simpler use cases.

Watch Out for These

Mistake

Audit effect blocks non-compliant resources from being created.

Correct

Audit only logs non-compliance; it does not block. The resource is created successfully but flagged as non-compliant. To block, use Deny.

Mistake

Deny effect automatically deletes existing non-compliant resources.

Correct

Deny only prevents creation or update of non-compliant resources. Existing resources remain unchanged, though they are marked non-compliant in the dashboard.

Mistake

Modify effect works on all resource types and properties.

Correct

Modify works only on properties that support modification via ARM, and you must specify the exact field path. Not all properties are modifiable, and some require specific role permissions.

Mistake

Remediation tasks for Modify effect run automatically after policy assignment.

Correct

Remediation tasks must be triggered manually or scheduled. They do not run automatically upon assignment. You must create a remediation task to scan and fix existing resources.

Mistake

You can use Deny to enforce tagging on existing resources.

Correct

Deny only applies to new resources. To enforce tagging on existing resources, use Modify with a remediation task or use Audit to report non-compliance.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

What is the difference between Audit and Deny effects in Azure Policy?

Audit logs non-compliance but allows the resource to be created or updated, while Deny blocks the operation entirely. Use Audit when you want to monitor compliance without disruption, and Deny when you must prevent non-compliant resources from existing. For example, to track which storage accounts lack HTTPS, use Audit; to prevent creation of such accounts, use Deny.

Can Deny effect be applied to existing resources?

No, Deny only applies during resource creation or update. Existing non-compliant resources are flagged as non-compliant but are not deleted or changed. To fix existing resources, use Modify or DeployIfNotExists effects with a remediation task.

How does Modify effect work in Azure Policy?

Modify effect automatically changes resource properties during creation or update, or via a remediation task. It can add, update, or remove fields. For example, you can automatically add a missing tag. The policy definition includes operations that specify the field and new value. The policy assignment must have a managed identity with permissions to modify the resource.

What happens if a Modify policy fails due to permissions?

If the managed identity lacks permissions, the resource is created/updated without modification, and the resource is marked as non-compliant. The failure is logged. Ensure the managed identity has the necessary RBAC role (e.g., Contributor) on the resource scope.

Which effect should I use to prevent deployment of resources in a specific region?

Use Deny effect. Create a policy that checks the 'location' field and denies if it matches the disallowed region. Deny will block any resource creation or update in that region.

Can I combine Audit and Deny effects in the same policy?

No, a single policy definition can have only one effect. However, you can assign multiple policies to the same scope. For example, one policy with Audit to log non-compliance and another with Deny to block the same condition. The Deny effect will take precedence.

What is the default compliance evaluation cycle for Azure Policy?

Azure Policy evaluates resources every 24 hours by default. This periodic scan updates the compliance state of resources. You can also trigger an on-demand evaluation via Azure CLI or PowerShell.

Terms Worth Knowing

Ready to put this to the test?

You've just covered Azure Policy Effects: Audit, Deny, Modify — now see how well it sticks with free SC-900 practice questions. Full explanations included, no account needed.

Done with this chapter?