Domain 1 β€” Module 6 of 6 100%
6 of 28 overall
Domain 1: Manage identity, access, and governance Free ⏱ ~14 min read

Governance: Azure Policy, RBAC, Custom Roles, Locks, IaC, Backup Security

How to enforce and audit security at scale on Azure: Azure Policy built-in and custom definitions, regulatory compliance in Defender for Cloud, resource locks, RBAC custom roles, overprivileged-access remediation, Azure Backup security, and IaC security controls.

Governance at scale, in one module

Simple explanation

Governance is how you keep the rules of your tenant from quietly breaking. A single security engineer cannot manually inspect every storage account, every NSG rule, every RBAC assignment across thousands of resources. So you express rules and run them automatically:

  • Azure Policy is the rules engine: β€œevery storage account must require HTTPS”, β€œno public IPs on production NSGs”, β€œall SQL servers must have auditing on”. Built-in definitions cover most baseline controls; you write custom definitions for the rules unique to your org.
  • Regulatory compliance in Defender for Cloud maps your environment against frameworks (ISO 27001, PCI DSS, NIST 800-53, CIS, SOC 2, etc.) and gives you a compliance scorecard with remediation steps.
  • Resource locks prevent accidental delete or modification on resources that should not change.
  • RBAC + custom roles let you grant least-privilege at exactly the scope and actions a role needs β€” and access reviews catch the privilege creep that always returns.
  • Azure Backup security features protect backup data itself from being attacked (Soft delete, immutability, multi-user authorisation).
  • IaC security controls push these guardrails leftward into Bicep, ARM, and Terraform pipelines so misconfigurations are caught before they ship.

Azure Policy

Azure Policy evaluates resources against rules at scale. Three primary moving parts:

Azure Policy moving parts β€” definition, initiative, assignment
FeaturePolicy definitionInitiative (policy set)Assignment
What it isA single rule (e.g. 'storage accounts must require HTTPS')A bundle of related policy definitions (e.g. 'CIS Azure benchmark v2.0.0')Applying a definition or initiative to a scope
Created byMicrosoft (built-in) or you (custom JSON)Microsoft (built-in) or you (custom)You β€” picks scope, parameters, identity for remediation
Effects availableDeny, Audit, AuditIfNotExists, DeployIfNotExists, Modify, Append, Manual, DisabledInherited from each contained definitionEffects can be overridden via parameters at assignment time
ScopeN/A β€” definitions are written but not yet appliedN/A β€” initiatives are written but not yet appliedManagement group, subscription, resource group, or resource
Identity neededNoNoManaged identity required for DeployIfNotExists and Modify effects

Effects you must know

  • Deny β€” blocks creation/update of resources that violate the policy. Hardest gate; pre-incident.
  • Audit β€” logs a compliance state but does not block. Most common starting point.
  • AuditIfNotExists β€” evaluates a related resource (e.g. β€œevery VM must have a diagnostic setting”) and audits if missing.
  • DeployIfNotExists (DINE) β€” auto-deploys a remediation template when the related resource is missing. Requires a system-assigned or user-assigned managed identity on the assignment, with role assignments to deploy the template.
  • Modify β€” mutates resource properties on create/update to comply (e.g. add a required tag).
  • Disabled β€” turns the policy off without removing the assignment.
Initial-state-vs-future-state trap

A frequent SC-500 exam pattern: β€œEsme wants to ensure all NEW storage accounts require secure transfer, AND she wants to remediate the 800 existing storage accounts that don’t have it.” The correct answer almost always combines two effects:

  • Deny for future violations β€” assigned at the subscription scope, this stops anyone from creating a non-compliant storage account from now on.
  • Modify or DeployIfNotExists for the existing 800 β€” assigned with a system-assigned managed identity, then run a remediation task that applies the change to all currently non-compliant resources.

Audit alone is the wrong answer because it leaves the existing 800 non-compliant indefinitely.

Custom policy definitions

When the built-in catalogue doesn’t cover a rule unique to your org, write a custom policy definition in JSON. Two parts:

  1. policyRule.if β€” the condition that selects resources (e.g. resource type = Microsoft.Network/networkSecurityGroups AND properties.securityRules[*].destinationPortRange contains '22' AND properties.securityRules[*].access = Allow AND properties.securityRules[*].sourceAddressPrefix = '*').
  2. policyRule.then β€” the effect (Deny, Audit, etc.) and any deployment template for DINE/Modify.

For SC-500, you should be able to read a custom definition’s JSON and explain what it does β€” not author it from scratch in the exam.

Regulatory compliance in Defender for Cloud

Defender for Cloud’s Regulatory compliance view maps your environment against compliance frameworks. By default, the Microsoft Cloud Security Benchmark (MCSB) is assigned and evaluated. You can add additional standards (PCI DSS, ISO/IEC 27001, NIST SP 800-53, CIS, SOC 2, HIPAA HITRUST, FedRAMP, country-specific frameworks like SWIFT CSCF or the NZISM equivalents).

Each standard breaks down into controls and recommendations. Defender for Cloud evaluates each recommendation against your environment, assigns a status (Healthy / Unhealthy / Not applicable / Not assessed), and aggregates to a per-standard compliance percentage.

For controls that Microsoft cannot automatically evaluate (process controls β€” β€œDocument an incident response plan”), you can perform manual attestation to mark the control as satisfied.

For controls that genuinely don’t apply, exemptions with a justification and expiry can be granted by an admin. Exemptions are recorded for the auditor and lapse on expiry, prompting re-review.

Resource locks

Two lock types:

  • CanNotDelete β€” resource can be modified but not deleted. The protection that prevents an az group delete from accidentally taking out a production resource group.
  • ReadOnly β€” resource cannot be modified or deleted. Stronger; useful for highly stable resources whose configuration must not change. Note: ReadOnly can interfere with operations that look like reads but are actually writes underneath β€” read carefully before applying.

Locks apply at subscription, resource group, or individual resource scope, and inherit downward. Locks override RBAC β€” even Owner cannot delete a CanNotDelete-locked resource without first removing the lock (which requires Microsoft.Authorization/locks/* permission).

RBAC at scale

Built-in roles cover the common cases β€” Owner, Contributor, Reader, plus service-specific roles (Key Vault Secrets User, Storage Blob Data Contributor, Virtual Machine Contributor, etc.). Two SC-500 surfaces:

  1. Custom Azure roles β€” when no built-in role fits, define a custom role with explicit Actions, NotActions, DataActions, NotDataActions, and AssignableScopes. Created at the tenant root or a management group, assignable at any scope at or under AssignableScopes.
  2. Microsoft Entra roles vs Azure roles β€” Entra roles govern directory operations (user management, app registration, policy admin). Azure RBAC roles govern Azure resource operations. They are separate systems with separate role definitions β€” Global Administrator is an Entra role, Owner is an Azure RBAC role. SC-500 expects you to know the distinction and pick the right surface for the task.

Detecting and remediating overprivileged access

Two primary signals:

  • Microsoft Entra Privileged Identity Management access reviews β€” scheduled review of role holders. Reviewer (manager, named approver, or self-attestation) confirms whether each assignment is still needed; unreviewed assignments can be auto-removed.
  • Microsoft Entra Permissions Management (formerly CloudKnox) β€” surfaces actual permission usage across Azure, AWS, and GCP. Identifies identities with unused or excessive permissions and proposes a right-sized role. Treats permission as data, not posture.

For Azure RBAC specifically, you can review assignments via the portal, az role assignment list, or the Microsoft Graph API, filter for assignments at high scopes (subscription Owner / Contributor), and remove or replace with narrower scopes.

Azure Backup security features

Backups must themselves be defended β€” ransomware actors increasingly target backup vaults specifically because deleting the backup forecloses recovery. Key Recovery Services / Backup vault settings:

  • Soft delete β€” deleted backups retained for 14 days (immutable) before purge. Enabled by default, recommended to keep on.
  • Immutable vaults β€” once enabled (and made irreversible), no one can shorten retention or delete backups before retention expires.
  • Multi-user authorisation (MUA) β€” protects critical operations on the vault (disable soft delete, change retention, delete) with a second-approver workflow via Microsoft Entra Resource Guard.
  • Cross-region restore β€” for region-redundant Recovery Services vaults, you can restore in a secondary region if the primary is compromised.

For the exam, the pattern is: β€œbackups should survive a tenant compromise”. The combination of soft delete + immutable + MUA is the answer.

IaC security controls

Two complementary patterns:

  1. Shift-left in pipelines β€” Defender for DevOps (when GitHub or Azure DevOps is connected) scans Bicep, ARM, Terraform, and Kubernetes manifests for misconfigurations during PRs. Pipelines can fail builds on high-severity findings.
  2. Runtime-side Azure Policy β€” DINE/Modify policies catch what slips through the pipeline. A workload deployed via a non-compliant template is corrected after the fact.

Microsoft.Security-namespace resources in Bicep let you express security-plan toggles (Defender for Cloud plan enablement, auto-provisioning, contact details, default workspace) as code β€” version-controlled, peer-reviewed, repeatable across subscriptions.

Scenario: Asha rolls out a tenant-wide governance baseline

Asha at Aurora Health Service is establishing a security baseline across 47 subscriptions under one management group hierarchy:

  1. Custom initiative at the root management group: combines the MCSB built-in initiative + 8 custom policies (no public-IP NSG rules outside the DMZ, all SQL servers have auditing on, all storage accounts require HTTPS + minimum TLS 1.2, no Owner role at subscription scope for human accounts, etc.). Mix of Deny for new and DeployIfNotExists for existing.
  2. Remediation tasks scheduled for each DINE policy to fix the existing fleet. Each remediation runs as the assignment’s managed identity with the minimum role to perform the fix.
  3. Regulatory compliance: in Defender for Cloud, attach NIST SP 800-53 Rev. 5 and ISO/IEC 27001 standards alongside MCSB. Quarterly compliance review with the security committee uses these views.
  4. PIM + access reviews: every standing Owner / Contributor at subscription scope migrated to PIM-eligible. Quarterly access review on the entire eligibility set.
  5. Backup hardening: every Recovery Services vault has soft delete + immutable enabled, MUA configured with two named approvers from outside the data-protection team.
  6. IaC: connect both Azure DevOps and GitHub to Defender for DevOps. Pipeline build fails on high-severity Bicep / Terraform findings. Bicep modules for new subscriptions include the Microsoft.Security plan-enablement resources so Defender for Cloud is on by default.

Result: the tenant has a written baseline expressed in policy, an auditable compliance scorecard, just-in-time admin access, immutable backups, and IaC catches misconfigurations before deploy. The next acquisition gets the same baseline by being added to the management group.

Key terms

Question

What is the difference between an Azure Policy 'Deny' and 'Audit' effect?

Click or press Enter to reveal answer

Answer

Deny blocks creation/update of resources that violate the policy β€” it's a runtime gate. Audit logs a non-compliant state but does not block the operation. Audit is the safest starting point for new policies; Deny is appropriate once a baseline has stabilised and you want to prevent regressions.

Click to flip back

Question

What does Azure Policy's DeployIfNotExists (DINE) effect do?

Click or press Enter to reveal answer

Answer

When a resource is created or updated, DINE checks for a related resource (e.g. a diagnostic setting on a VM); if missing, it deploys a template to create it. Requires a managed identity on the policy assignment with appropriate role assignments to deploy the template. Remediation tasks can apply DINE to already-non-compliant resources.

Click to flip back

Question

What is the Microsoft Cloud Security Benchmark (MCSB)?

Click or press Enter to reveal answer

Answer

Microsoft's prescriptive set of security controls for Azure (and increasingly AWS/GCP) β€” the default regulatory standard in Defender for Cloud. Built-in policies, recommendations, and a compliance view assess your environment against MCSB. Other standards (PCI, ISO 27001, NIST 800-53, etc.) can be added alongside.

Click to flip back

Question

What is the difference between an Azure RBAC role and a Microsoft Entra role?

Click or press Enter to reveal answer

Answer

Azure RBAC roles govern access to Azure resources (subscriptions, resource groups, individual resources) and use Actions/NotActions/DataActions. Microsoft Entra roles govern directory operations (user management, app registration, policy administration). They are separate systems β€” `Owner` is an Azure RBAC role; `Global Administrator` is an Entra role.

Click to flip back

Question

What is multi-user authorisation (MUA) on Azure Backup?

Click or press Enter to reveal answer

Answer

A protection that requires a second-approver workflow (via a Microsoft Entra Resource Guard) for critical destructive operations on Recovery Services / Backup vaults β€” disable soft delete, change retention, delete backups. Designed to defend backups against insider or compromised-credential attacks.

Click to flip back

Knowledge check

Knowledge Check

Esme at Northwind Bank wants to ensure all NEW storage accounts require secure transfer (HTTPS), AND remediate the 800 EXISTING storage accounts that don't currently require it. Which Azure Policy approach is correct?

Knowledge Check

Asha at Aurora Health Service wants to identify identities in her Azure environment with permissions they do not actually use β€” to right-size their roles. Which Microsoft service is purpose-built for this?

Knowledge Check

Dom at Kestrel Cyber Co-op is hardening a client's Recovery Services vault against ransomware actors who target backups. He's already enabled soft delete and immutable vault. What is the next step that prevents an attacker (or a compromised admin) from disabling those very protections?

Domain 1 wrap-up

You’ve covered identity, application identity, managed identities, Key Vault, and governance. Next up is Domain 2 β€” Secure storage, databases, and networking (25–30% of the exam β€” the heaviest domain by weight).

We start with storage account security and Defender for Storage, then move through Azure SQL and Defender for Databases, then deep-dive on the network controls: NSGs, ASGs, Virtual Network Manager, Virtual WAN, VPN, Entra Private Access, Private Endpoints, Private Link, Azure Firewall, and Network Watcher.