Governance & Compliance: Policy, Locks & Purview
AZ-900 AZ-900 · Describe Azure management and governance
Governance: rules that enforce themselves
Governance is how an organisation makes sure its Azure environment stays compliant, secure, and organised — not by asking people to follow a document, but by building the rules into the platform. Three tools do this in Azure, and the exam tests each: Microsoft Purview (data governance and compliance), Azure Policy (rules for resources), and resource locks (protection against accidental change). They answer three different questions: what data do we have and is it compliant (Purview), do our resources follow our rules (Policy), and can anyone accidentally delete or change this (locks)?
Microsoft Purview: governing data
Microsoft Purview is Microsoft's data governance and compliance solution. In Azure, its purpose is to help organisations discover, classify, and govern their data: it scans data sources, builds a map of where data lives (the data map), catalogues it so people can find and understand it (the data catalog), and classifies sensitive data such as personal information. Purview also covers the compliance side — data loss prevention, information protection, and records management in Microsoft 365 — but for AZ-900 the exam focus is the Azure purpose: data governance. If a question asks which service helps an organisation discover and classify its data across Azure, the answer is Microsoft Purview. Do not confuse it with Azure Policy: Purview governs data, Policy governs resources.
Azure Policy: rules for resources
Azure Policy creates, assigns, and manages rules that control what can happen to resources. A policy definition states a rule and an effect; a policy assignment applies it to a scope (management group, subscription, or resource group). Common examples: "virtual machines may only be created in the UK South region", "all storage accounts must use HTTPS only", "every resource must carry a Department tag".
Policy effects decide what happens when a resource breaks the rule:
- Deny: blocks the non-compliant action — the resource cannot be created or changed. Use it to prevent violations.
- Audit: allows the action but records it as non-compliant. Use it to monitor without blocking, often as a first step before enforcing.
- Append / Modify: adds or changes properties automatically — for example, adding a required tag.
- DeployIfNotExists: deploys something when a condition is not met — for example, enabling diagnostics on a resource that lacks them.
- Disabled: turns the rule off without deleting it.
Policies can be grouped into an initiative (a set of policy definitions managed as one unit, such as a compliance framework), and the Policy compliance dashboard shows which resources comply and which do not. Two exam points: Policy evaluates resources when they are created or changed (and periodically afterwards), and Policy does not delete existing non-compliant resources — it flags them (Audit) or blocks new violations (Deny). Fixing existing resources is done through remediation tasks, not automatic deletion.
Resource locks: protection against accidents
Resource locks prevent accidental deletion or modification of important resources. There are two types:
- CanNotDelete: the resource cannot be deleted, but it can still be modified. Use it for critical resources that must never disappear — a production database, a key vault.
- ReadOnly: the resource cannot be deleted or modified — only read. Use it for resources that must not change at all, such as a frozen production environment.
Locks apply at the subscription, resource group, or resource level, and they are inherited: a lock on a resource group protects every resource inside it. Locks apply to everyone, including administrators and subscription owners — the only way past a lock is to remove it, which itself requires permission. And locks are about accidents, not security: they do not control who can read data or use a resource, only whether it can be changed or deleted. The exam's classic lock question: "a critical database must not be deleted, but the team still needs to update it" — CanNotDelete, not ReadOnly, because ReadOnly would block the updates too.
Policy vs locks vs RBAC: the exam's favourite confusion
Three tools, three jobs — and the exam loves to mix them up:
| Tool | Question it answers | Example |
|---|---|---|
| Azure Policy | Do resources follow our rules? | "Only allow VMs in UK South"; "Require a CostCenter tag" |
| Resource locks | Can this be accidentally changed or deleted? | "Nobody may delete the production database" |
| Azure RBAC | Who is allowed to do what? | "Developers get Contributor on the dev resource group" |
| Microsoft Purview | What data do we have, and is it governed? | "Find and classify all personal data in our stores" |
When a scenario asks about enforcing a standard (regions, tags, encryption settings), reach for Policy. When it asks about preventing deletion or change, reach for locks. When it asks about who can do something, reach for RBAC. When it asks about data discovery and classification, reach for Purview.
Worked example: governing a growing environment
A company is growing fast and its Azure environment is getting messy: resources appear in random regions, nobody knows what each project costs, and last month someone deleted a production database by mistake. The governance fix: an Azure Policy initiative assigned at the management group — allowed regions only, a required Project tag on every resource (Deny effect for new resources, Audit for existing ones), and automatic tag inheritance so resources pick up their group's tags. A CanNotDelete lock on the production database's resource group so it cannot be deleted again. And Microsoft Purview scanning the company's data stores to find and classify customer personal data for compliance reporting. Policy for the rules, locks for the accidents, Purview for the data — the three tools together are the governance answer.
Scope: where governance applies
Governance tools follow the resource hierarchy, and the scope you choose decides how widely a rule applies. A policy assigned at a management group flows down to every subscription, resource group, and resource beneath it — the right scope for company-wide rules such as allowed regions. A policy assigned at a subscription covers one environment, such as production. A policy assigned at a resource group covers one workload. The same applies to locks: a lock on a management group protects everything beneath it, while a lock on a single resource protects just that resource. The exam tests this with scenarios about where to apply a rule: company-wide standards belong at the management group, and the narrower the need, the narrower the scope. The compliance dashboard then shows, at whatever scope you are looking at, which resources comply and which do not — so a manager can see the health of the whole organisation from the management group, and a developer can see just their resource group.
Exam traps to watch for
- Using a ReadOnly lock when updates must continue. ReadOnly blocks modification as well as deletion; CanNotDelete allows changes but prevents deletion.
- Expecting Azure Policy to delete non-compliant resources. Policy audits or denies; it does not delete. Remediation tasks fix existing resources.
- Confusing Purview with Policy. Purview governs data (discovery, classification, compliance); Policy governs resources (rules, effects, compliance).
- Reaching for RBAC when the question is about enforcing a rule. RBAC controls who can do what; Policy controls what resources are allowed to be.
Practice questions
Test yourself on this guide. Answers are checked instantly, with a full explanation for each question.
Q1.A company wants to ensure that no one can create virtual machines outside the UK South region. Which Azure service should it use?
Explanation: Azure Policy enforces rules on resources — here, a policy with a Deny effect on VMs outside UK South. Resource locks prevent deletion or modification, not creation in a region. Purview governs data, not resource placement. RBAC controls who can act, not where resources may be created.
Exam objective: AZ-900 Describe features and tools in Azure for governance and compliance: describe the purpose of Azure Policy
Q2.A critical production database must never be deleted, but the database team still needs to update its configuration. Which resource lock should be applied?
Explanation: CanNotDelete prevents deletion while still allowing modification — exactly the requirement. ReadOnly would block the configuration updates as well as deletion. Deny and Audit are Azure Policy effects, not resource lock types.
Exam objective: AZ-900 Describe features and tools in Azure for governance and compliance: describe the purpose of resource locks
Q3.A company wants to discover where its customer personal data lives across its Azure data stores and classify it for compliance reporting. Which service should it use?
Explanation: Microsoft Purview is the data governance solution: it discovers, maps, catalogues, and classifies data across sources. Azure Policy governs resource configuration, not data content. Azure Monitor collects operational metrics and logs. Defender for Cloud assesses security posture and threats.
Exam objective: AZ-900 Describe features and tools in Azure for governance and compliance: describe the purpose of Microsoft Purview in Azure
Q4.An organisation wants to group several related policy definitions — allowed regions, required tags, and encryption requirements — into a single unit it can assign and manage together. What is this grouping called?
Explanation: An initiative is a set of policy definitions grouped and managed as one unit, such as a compliance framework. A management group contains subscriptions. A resource group contains resources. A role assignment is an RBAC concept (principal + role + scope).
Exam objective: AZ-900 Describe features and tools in Azure for governance and compliance: describe the purpose of Azure Policy
Q5.A company applies a ReadOnly lock to a resource group. What happens to the resources inside the group?
Explanation: Locks are inherited: a lock on a resource group applies to every resource inside it, so ReadOnly prevents both deletion and modification of those resources. 'Modified but not deleted' describes CanNotDelete. Locks do not move resources anywhere. And locks definitely affect the resources in the group — inheritance is a core lock behaviour.
Exam objective: AZ-900 Describe features and tools in Azure for governance and compliance: describe the purpose of resource locks
Q6.A company wants to monitor which of its storage accounts are not using HTTPS-only traffic, without blocking anything yet. Which Azure Policy effect should the policy use?
Explanation: The Audit effect records non-compliant resources without blocking the action — monitoring without enforcement. Deny would block non-compliant changes. CanNotDelete is a resource lock type, not a policy effect. Modify changes resource properties automatically, which is more than monitoring.
Exam objective: AZ-900 Describe features and tools in Azure for governance and compliance: describe the purpose of Azure Policy
Q7.Which statement about Azure Policy is correct?
Explanation: Policy evaluates compliance (Audit) and can block non-compliant actions (Deny), but it does not delete existing non-compliant resources — remediation handles those. Policy does not control user sign-ins (that is Entra ID and Conditional Access). Policy applies to all resource types, not only VMs.
Exam objective: AZ-900 Describe features and tools in Azure for governance and compliance: describe the purpose of Azure Policy
Q8.A resource lock is applied to a production resource group. A subscription Owner tries to delete a resource in that group. What happens?
Explanation: Resource locks apply to all users, including administrators and subscription Owners — the deletion is blocked until someone with permission removes the lock. There is no Owner bypass, no warning-period override, and locks are never removed automatically.
Exam objective: AZ-900 Describe features and tools in Azure for governance and compliance: describe the purpose of resource locks