Study guide

3.3 Azure Policy

Microsoft Azure Fundamentals AZ-900

Track your progress as you read

Finished sections get a check mark.

1 Introduction

About the Microsoft Azure Fundamentals (AZ-900) Exam Study Strategies and Exam Tips

2 Domain 1: Cloud Concepts (25-30%)

1.1 What Is Cloud Computing? 1.2 Cloud Service Models (IaaS, PaaS, SaaS) 1.3 Cloud Deployment Models (Public, Private, Hybrid) 1.4 The Consumption-Based Model

3 Domain 2A: Azure Architecture Components

2.1 Azure Regions and Availability Zones 2.2 Azure Resource Hierarchy (Management Groups, Subscriptions, Resource Groups) 2.3 Azure Resource Manager (ARM) Overview

4 Domain 2B: Azure Compute Services

2.3 Azure Virtual Machines 2.4 Azure App Service, Containers, and Serverless 2.5 Azure Virtual Desktop

5 Domain 2C: Azure Networking Services

2.6 Azure Virtual Networks (VNet) 2.7 Azure VPN Gateway and ExpressRoute 2.8 Azure Load Balancing and Content Delivery

6 Domain 2D: Azure Storage Services

2.9 Azure Storage Accounts and Services 2.10 Azure Database Services 2.11 Azure Data Services and Analytics

7 Domain 2E: Azure Identity, Access, and Security

2.11 Microsoft Entra ID (Azure Active Directory) 2.12 Azure RBAC, Zero Trust, and Defense in Depth 2.13 Azure Security Services

8 Domain 3A: Azure Cost Management

3.1 Factors That Affect Azure Costs 3.2 Azure Pricing Calculator and Cost Management 3.3 Using Tags for Cost Management and Organization

9 Domain 3B: Azure Governance and Compliance

3.3 Azure Policy 3.4 Resource Locks and Tags 3.5 Azure Blueprints, ARM Templates, and Bicep 3.6 Azure Governance Features: Putting It All Together

10 Domain 3C: Azure Monitoring and Management Tools

3.6 Azure Monitor and Service Health 3.7 Azure Compliance, Privacy, and Trust 3.8 Azure Activity Log, Diagnostics, and Resource Health

11 Additional Azure Services and Exam Review

Azure AI and Machine Learning Services Azure IoT and DevOps Services AZ-900 Exam Review: Key Concepts Summary Common AZ-900 Exam Scenarios and Practice

12 Advanced Azure Topics and Service Deep Dives

Azure Migration Services and Tools High Availability and Disaster Recovery in Azure Azure Networking: Private Link, Service Endpoints, and Bastion Azure Management Tools: Portal, CLI, PowerShell, and Cloud Shell Azure SLAs, Service Lifecycle, and Support Plans

3.3 Azure Policy

Key Takeaways Explain This Topic AI

Azure Policy creates, assigns, and manages rules that keep resource configurations compliant with corporate standards.

Policy can audit existing resources OR block (Deny) non-compliant ones at creation time — a user with Owner can still be blocked.

A Policy Initiative (also called a policySet) bundles many related definitions into one assignable unit with a single compliance roll-up.

Azure Policy controls WHAT a resource can do; RBAC controls WHO can access it — they are complementary, not interchangeable.

Built-in definitions cover allowed locations, allowed VM SKUs, required tags, and encryption; remediation tasks fix existing resources.

Last updated: October 2026

Quick Answer: Azure Policy enforces rules on resource configuration. It can audit existing resources for compliance and use the Deny effect to block non-compliant resources at creation. Policy controls WHAT resources can do; RBAC controls WHO can access them.

What Is Azure Policy?

Azure Policy is a governance service that creates, assigns, and manages policies that enforce rules on the configuration of your Azure resources. It evaluates resources against business rules so they stay aligned with corporate standards and service-level agreements. Policy is free of charge and is enforced through Azure Resource Manager (ARM) , the deployment and management layer every request passes through.

A critical AZ-900 distinction: Policy evaluates the properties of resources (region, SKU, tags, encryption setting), not the identity of the caller. That is RBAC's job. Because both run inside ARM, an action must satisfy RBAC and Policy to succeed.

The Policy Lifecycle

Define — author a policy definition in JSON, or pick one of the 1,000+ built-ins.

Assign — attach the definition to a scope: management group, subscription, or resource group.

Evaluate — Policy scans resources in scope; full scans run roughly every 24 hours and on demand.

Report — results appear in the compliance dashboard as Compliant or Non-compliant.

Enforce / Remediate — new violations are blocked (Deny) and existing ones can be fixed by a remediation task.

Policy Effects

Each definition declares an effect that decides what happens when a resource matches the rule. Memorize the difference between Audit (report only) and Deny (block). The main effects are below; Azure Policy also has others, such as DenyAction, which blocks certain actions on resources.

Effect What it does

Deny Blocks creation or update of a non-compliant resource.

Audit Flags the resource as non-compliant in the dashboard but does NOT block it.

Append Adds extra fields to the request (e.g., a default tag) during creation.

Modify Adds, updates, or removes properties/tags on existing and new resources.

DeployIfNotExists (DINE) Deploys a related resource if missing (e.g., a diagnostic setting). Needs a managed identity.

AuditIfNotExists Audits when a related resource is missing.

Disabled Turns off evaluation — useful for testing an assignment.

Built-in Definitions and Initiatives

Built-in definition Effect example

Allowed locations Deny resources outside approved regions (e.g., only East US, West Europe).

Allowed virtual machine size SKUs Deny VM sizes outside an approved list.

Require a tag on resources Deny resources missing a required tag such as CostCenter .

Storage accounts should restrict network access Audit or Deny insecure storage.

A Policy Initiative (also called a policySet ) groups many definitions so they are assigned and reported as one unit — for example, Microsoft Learn describes the Enable Monitoring in Azure Security Center initiative, which contains over 100 separate policy definitions. When a scenario describes enforcing several related rules at once , the answer is an initiative, not many separate assignments.

Remediation and Compliance Dashboard

Audit only reports drift; to fix existing resources you create a remediation task , available for the Modify and DeployIfNotExists effects (these use a managed identity granted the needed role). The compliance dashboard in the portal shows the overall compliance percentage, per-policy status, and the specific non-compliant resources with guidance.

Policy vs. RBAC

Azure Policy Azure RBAC

Question WHAT can a resource be/do? WHO can perform an action?

  • Example "VMs must be in East US" "Jane is Contributor on Sub-1"
  • Default Allowed unless a policy denies Denied unless a role grants

On the Exam: A user with the Owner role can still be blocked by a Deny policy from creating a VM in a forbidden region. Policy and RBAC are independent gates — both must pass.

A Worked Governance Scenario

Imagine Contoso runs forty subscriptions and finance keeps discovering untagged resources and storage accounts deployed in unapproved regions. Three policies solve this without touching a single resource by hand. First, assign Allowed locations with the Deny effect at the management group so any deployment outside East US or West Europe is rejected the moment it is submitted. Second, assign Require a tag on resources with Deny so a resource cannot be created unless it carries a CostCenter tag.

Third, group both with a third Audit policy that checks for HTTPS-only storage into a single initiative named "Contoso Baseline" and assign that initiative once at the top management group.

After the next evaluation cycle the compliance dashboard reports, for example, ninety-two percent compliant, listing the eight percent of legacy resources that pre-date the rules. Those existing resources were grandfathered in because Deny only blocks new or changed resources — it never retroactively deletes anything. To fix the legacy estate you add a Modify policy to append the missing tag and create a remediation task , which uses a managed identity to write the tag across the non-compliant resources in bulk.

Common Traps

Audit does not block. If a question says resources "must be prevented" from being created, Audit is wrong — choose Deny .

Policy is not security. It governs configuration, not identity; RBAC handles who.

Deny is not retroactive. Existing non-compliant resources stay until remediated; only new or updated ones are blocked.

DeployIfNotExists and Modify need a managed identity with the right role, or remediation fails.