Study guide

4.1 Azure Policy for Security Controls

Microsoft Certified: Cloud and AI Security Engineer Associate SC-500

Track your progress as you read

Finished sections get a check mark.

1 Introduction & Exam Overview

1.1 Current Exam Facts 1.2 Skills Measured & Weightings 1.3 Study Path, Prerequisites & Exam Strategy

2 Microsoft Entra ID Secure Access

2.1 Privileged Identity Management (PIM) 2.2 Conditional Access Policies 2.3 MFA and Passwordless Authentication 2.4 Application Identities, OAuth Consent & Managed Identities

3 Azure Key Vault Secrets and Keys

3.1 Deploy and Configure Key Vault 3.2 Access Control and Firewall for Key Vault 3.3 Keys, Secrets, Certificates & Defender for Key Vault

4 Governance, Policy & RBAC

4.1 Azure Policy for Security Controls 4.2 Defender for Cloud Compliance & Security Standards 4.3 Resource Locks and Azure RBAC 4.4 Custom Roles, Overprivileged Access, Backup & IaC Security

5 Secure Storage Accounts

5.1 Storage Account Security Fundamentals 5.2 Storage Firewalls and Access Policies 5.3 Defender for Storage

6 Secure Databases

6.1 Azure SQL Platform Security 6.2 Database Auditing 6.3 Defender for Databases

7 Network Security Groups & Virtual Network Manager

7.1 Network Security Groups and Application Security Groups 7.2 Azure Virtual Network Manager Security Admin Rules 7.3 Virtual WAN and VPN Security

8 Private Access, Private Link & Azure Firewall

8.1 Microsoft Entra Private Access 8.2 Private Endpoints and Private Link 8.3 Azure Firewall 8.4 Network Watcher Diagnostics and Effective Rules

9 Security for AI Workloads

9.1 Purview DSPM for AI and Data Overexposure 9.2 Copilot Studio Protection and Agent Management 9.3 Microsoft Entra Agent ID Security 9.4 Defender for AI, Foundry Guardrails & AI Gateway

10 Secure Servers and Virtual Machines

10.1 Disk Encryption 10.2 Azure Bastion and JIT VM Access 10.3 Azure Arc and Defender for Servers 10.4 Trusted Launch, VM Security Features & Machine Configuration

11 Application Platform Security

11.1 Containers: AKS, ACR, ACI, Container Apps & Defender for Containers 11.2 Azure Functions and Logic Apps Security 11.3 Azure App Service Security 11.4 Web Application Firewall and API Management Protection

12 Defender for Cloud Security Posture

12.1 Defender CSPM and Secure Score 12.2 Workload Protection Plans and Multicloud Connectors 12.3 Vulnerability Management and Defender EASM

13 Microsoft Sentinel Activity and Event Collection

13.1 Workspaces, Roles & Content Hub 13.2 Data Connectors, Syslog/CEF & Windows Event Collection 13.3 Custom Tables, Retention & Purview Audit 13.4 Automation Rules and Playbooks

14 Microsoft Security Copilot & Final Review

14.1 Microsoft Security Copilot Workspaces and Roles 14.2 Plugins and Security Agents 14.3 Final Review and Exam-Day Strategy

4.1 Azure Policy for Security Controls

Key Takeaways Explain This Topic AI

Azure Policy evaluates resource properties against rules at create/update time and on a periodic scan of existing resources; RBAC controls who can act, Policy controls what configuration is allowed.

Built-in definitions cover common security baselines; custom definitions use JSON (or Bicep) with if/then rules when Microsoft does not ship an exact control.

Initiatives (policy sets) group related definitions so one assignment can enforce an entire security or compliance package.

Assignment scopes are management group, subscription, or resource group; exclusions carve out specific child scopes without removing the assignment.

Key effects for SC-500: Deny, Audit, DeployIfNotExists, Modify, Append, and Disabled—order of evaluation and control-plane vs data-plane impact are frequent exam traps.

Last updated: July 2026

4.1 Azure Policy for Security Controls

Quick Answer: Use Azure Policy to enforce security and regulatory configuration on Azure resources. Assign built-in or custom definitions (or initiatives ) at a management group, subscription, or resource group . Choose effects such as Deny , Audit , DeployIfNotExists , Modify , Append , or Disabled . Policy does not replace RBAC—Policy shapes resource configuration ; RBAC shapes who may perform actions .

The SC-500 domain Manage identity, access, and governance explicitly measures implementing security controls with Azure Policy (built-in and custom definitions), evaluating regulatory compliance in Defender for Cloud, resource locks, RBAC, backup security, and infrastructure as code. This section is the Policy foundation; later sections cover Defender standards, locks/RBAC, and backup/IaC.

Why Policy Matters for Cloud Security Engineers

In a multi-subscription enterprise, you cannot rely on every engineer to remember that storage accounts must block public blob access, that Key Vaults need soft-delete and purge protection, or that VMs must use managed disks with encryption. Azure Policy continuously evaluates resources and can block noncompliant creates/updates , audit drift , or auto-remediate missing settings via DeployIfNotExists and Modify.

Policy evaluations apply at Azure Resource Manager (control plane) for most definition modes. A Deny policy stops a noncompliant deployment request before the resource provider completes the change. Periodic compliance scans re-evaluate existing resources so the compliance state stays current even if nothing new was deployed.

Policy Building Blocks

  • Component What it is Exam use
  • Definition Single rule: conditions + effect Enforce one control (e.g., allowed locations)
  • Initiative (policy set) Group of definitions Assign CIS/MCSB-style packages or org baselines
  • Assignment Binding of definition/initiative to a scope Where enforcement actually starts
  • Exemption Documented carve-out for a scope or resource Temporary waiver with category and expiration

Remediation task Job that applies DeployIfNotExists/Modify to existing noncompliant resources Fix drift after assignment

Built-in vs custom definitions

Built-in definitions ship with Azure and cover hundreds of security scenarios: allowed locations, require HTTPS on storage, disable public network access on Key Vault, require diagnostic settings, restrict SKUs, enforce tags, and more. Prefer built-ins when they match the control—Microsoft maintains the logic and aliases.

Custom definitions are JSON (or authored via Bicep/portal) when you need organization-specific rules: a required naming prefix, a custom tag schema, a nonstandard encryption property, or a combination of conditions not covered by a built-in. Custom definitions still use the same policy language: an if condition over resource properties/aliases and a then effect.

Scenario: Contoso must allow only eastus and eastus2 for production workloads and must deny public IP on VMs. Assign the built-in Allowed locations policy with a parameter for the two regions, and assign a built-in or custom definition that denies public IP configurations. One initiative can bundle both for a single “Prod security baseline” assignment.

Initiatives

An initiative packages many definitions so operators assign once. Microsoft and third-party compliance packages often appear as initiatives. Changing initiative membership or definition versions can change compliance scores across every assignment of that initiative—plan initiative design carefully in large tenants.

Assignment scopes

  • Scope Typical use
  • Management group Enterprise-wide baselines (e.g., all production landing zones)
  • Subscription Environment-specific rules (prod vs nonprod)
  • Resource group Workload or team isolation

Child scopes inherit parent assignments. Use exclusions on an assignment to skip a specific subscription, resource group, or resource without deleting the enterprise assignment. Exclusions are a common interview and exam answer when one legacy app cannot yet meet a Deny rule but the rest of the estate must stay locked down.

You can also set notScopes (exclusions) and use resource selectors or overrides on modern assignments to refine which resources are evaluated and which effect applies. For SC-500 depth, know that assignment scope + effect + parameters determine real-world behavior—not the definition alone.

Effects you must know

  • Effect Behavior When to use
  • Deny Blocks noncompliant create/update Hard security guardrails
  • Audit Allows operation; marks noncompliant Measure first, enforce later
  • AuditIfNotExists Audits when a related resource/extension is missing Logging/diagnostic gaps

DeployIfNotExists (DINE) Deploys missing related resources (needs managed identity + role) Auto-enable diagnostics, extensions

  • Modify Adds/changes tags or supported properties during create/update Enforce tags, some security flags
  • Append Adds fields (often tags/arrays) without full replace Older pattern; Modify often preferred
  • Disabled Definition not evaluated Temporary off switch without removing assignment

Order of evaluation (high level): Disabled first; then Append/Modify (which can change the request); then Deny; then Audit/manual paths; existence-based effects (AuditIfNotExists/DeployIfNotExists) complete after resource provider success for Resource Manager modes. Multiple policies stack; the net result is cumulatively restrictive —two Deny policies with conflicting location rules can block creation entirely.

DeployIfNotExists operational notes

DINE does not silently fix everything the moment you assign it. You need:

A managed identity on the assignment.

That identity granted enough RBAC to create the missing resource (for example, permissions to write diagnostic settings).

Often a remediation task to fix already-existing noncompliant resources.

Exam questions love the distinction: Deny stops the bad config; DINE adds the missing security control after the resource exists (or via remediation).

Compliance evaluation

After assignment, Azure Policy marks each resource Compliant , Non-compliant , Exempt , Conflicting , or other states depending on effect and condition. Non-compliant resources for Audit/DINE appear in the Policy compliance blade and often surface as inputs to Defender for Cloud recommendations and regulatory standards (next section).

New/updated resources are evaluated on the write path. Existing resources are scanned periodically (typically on the order of hours, not seconds). Do not promise “instant” compliance dashboard updates after a portal click—wait for the next evaluation cycle or trigger remediation where supported.

Azure Policy vs Azure RBAC (exam distinction)

Question Answer with Policy Answer with RBAC

Can anyone with Contributor create a public storage account? Deny public blob access / public network policies Contributor still has write but Policy can Deny the noncompliant property set

  • Who can delete a Key Vault? Policy does not grant/delete people Owner/Contributor (and locks) control delete
  • Force HTTPS-only on storage Policy Deny/Modify on property Role cannot express “must use HTTPS”
  • Temporary admin access Not Policy PIM eligible roles (Entra) + Azure RBAC assignment

Exam trap: A user has Owner on a subscription and still cannot deploy a resource in an unapproved region. That is Policy Deny , not a missing role. Conversely, a user with correct Policy-compliant template but Reader role cannot deploy— that is RBAC .

Practical security patterns

Landing-zone Deny baseline at management group: allowed locations, require TLS, block public network access on sensitive PaaS, require Key Vault purge protection for production initiatives.

Audit → Deny journey: Start with Audit for 30 days, remediate, then switch effect parameter to Deny.

Guest configuration / Machine Configuration policies for in-guest OS settings (covered more with compute security)—still Policy assignments under the hood.

Exemptions with expiration for break-glass subscriptions, never permanent silent exclusions.

Exam traps

Confusing initiative with definition .

Thinking Policy assignments at resource group stop data-plane blob deletes (they generally do not; Policy is primarily control-plane configuration).

Forgetting DINE needs identity + role + remediation .

Believing Disabled deletes the assignment (it only turns evaluation off).

Using Policy to “grant least privilege” instead of RBAC/PIM.

Master these building blocks and you can map almost any “enforce security configuration at scale” scenario on SC-500 to the correct Policy design.