Azure Governance and Compliance: Purview, Policy, and Resource Locks
Azure governance and compliance is the set of tools that keeps an Azure environment organized, consistent and safe as it grows, by enforcing standards automatically instead of trusting everyone to follow the rules by hand. For AZ-900 you need to describe the purpose of three tools and know when each applies. Microsoft Purview governs your data: it maps and catalogs data across Azure, on-premises and other clouds, classifies sensitive information, shows lineage, and adds risk-and-compliance capabilities such as data loss prevention. Azure Policy governs how resources are configured: it evaluates them against rules such as approved regions or required tags, and its effect decides whether a non-compliant resource is reported (audit), blocked (deny) or corrected (modify). Resource locks protect resources from accidental deletion or change, using CanNotDelete or ReadOnly, and they apply to everyone until a user allowed to manage locks removes them. You also need the classic distinction between Azure Policy and role-based access control (RBAC): RBAC controls who can act, while Policy controls what is allowed. This lesson explains each tool, how scope and inheritance work, and how the three combine in one scenario.
On this page9 sections
- What governance and compliance mean in Azure
- Microsoft Purview: unified data governance
- Azure Policy: enforce rules on resources
- Policy effects and existing resources: audit, deny, modify
- Policy initiatives: many rules managed as one
- Azure Policy vs RBAC: what versus who
- Resource locks: prevent accidental changes
- Azure Blueprints: retiring, and not on the exam
- Worked example: one scenario, three tools
- Describe the purpose of Microsoft Purview and distinguish its data map and catalog, classification, lineage and data loss prevention capabilities.
- Explain how Azure Policy evaluates resources, and compare the audit, deny and modify effects.
- Describe how policy assignments and initiatives are scoped and inherited, and what happens to resources that already exist.
- Distinguish Azure Policy (what is allowed) from RBAC (who can act).
- Compare CanNotDelete and ReadOnly locks, and explain lock inheritance and who can remove a lock.
- Combine Purview, Azure Policy and resource locks to meet a single governance scenario.
What governance and compliance mean in Azure
Governance is the set of controls that keep a cloud environment consistent with your organization's rules, and compliance is being able to show you actually meet those rules and any external regulations. As a company deploys more resources across more teams and subscriptions, it becomes impossible to police everything by hand. Governance tools let you define standards once and have Azure apply and check them for you.
The AZ-900 exam focuses on three tools in this area, each with a distinct job. Microsoft Purview governs your data, helping you find, understand and protect information across the estate. Azure Policy governs your resources, enforcing rules about how they are configured and where they are deployed. Resource locks protect individual resources, resource groups or subscriptions from accidental deletion or change.
It also helps to keep governance separate from access control. Role-based access control, or RBAC, decides who can perform actions, while Azure Policy decides what configurations are allowed regardless of who is acting. The two work together: a user might have full permission to create a virtual machine through RBAC, yet a policy can still block that VM if it breaks a rule such as an approved-region restriction.
Microsoft Purview: unified data governance
Microsoft Purview is Microsoft's unified data governance, security and compliance service: it helps you find out what data you hold, where it lives and how sensitive it is, across Azure, on-premises systems, other clouds and SaaS sources. Its purpose is visibility and control over the data itself, wherever it is stored.
Purview's capabilities are distinct, and questions often name one of them:
| Capability | What it does |
|---|---|
| Data map and catalog | Scans registered sources (for example Azure Blob Storage, on-premises SQL Server, Power BI) into one searchable inventory, so people can find datasets and understand what they contain |
| Classification | Recognizes and labels sensitive information such as personal or financial data, so you can show where it lives |
| Lineage | Shows how data moves and is transformed between systems, from source to report |
| Data loss prevention (DLP) | A Purview risk-and-compliance capability that detects sensitive information and helps stop it from being shared or leaving the organization inappropriately |
For AZ-900 you do not configure Purview; you recognize its purpose. Scenarios about searching for data across sources, discovering where sensitive or personal data is stored, tracing how data flows, or preventing sensitive data from leaking point to Purview. Purview does not stop someone from deploying a resource in the wrong region, and it does not protect a resource from deletion: those are jobs for Azure Policy and resource locks.
| Aspect | Microsoft Purview | Azure Policy |
|---|---|---|
| Governs | Data: what you hold, where, how sensitive | Resources: how they are configured and deployed |
| Typical need | Find and classify personal data across systems | Allow only approved regions or require a tag |
| Reach | Azure, on-premises, other clouds, SaaS | Azure resources (and Arc-enabled resources) |
Azure Policy: enforce rules on resources
Azure Policy is the service that evaluates Azure resources against your organization's rules and then reports, blocks or corrects anything that does not comply. You write (or pick a built-in) policy definition that describes a rule, then assign it to a scope.
Common examples of rules Azure Policy can enforce:
- Allowed locations: resources may only be created in approved regions, for example for data residency.
- Required tags: every resource must carry a tag such as a cost center.
- Allowed SKUs: only approved virtual machine sizes or service tiers may be used, which helps control cost.
- Required settings: for example storage accounts must use secure transfer (HTTPS only) or must not allow anonymous public access.
Scope and inheritance. An assignment can be made at a management group, a subscription, a resource group or an individual resource. It is inherited by everything beneath that scope: an assignment on a management group applies to all its child subscriptions, their resource groups and their resources, including resources created after the assignment. This is how one rule governs a whole organization without being assigned again and again.
Policy evaluates resource properties during create and update requests and also periodically checks existing resources, showing the results on a compliance dashboard. Whenever a question describes enforcing configuration rules on resources, the answer is Azure Policy.
Policy effects and existing resources: audit, deny, modify
A policy's effect decides what happens when a resource does not comply. Three effects are worth knowing for AZ-900:
| Effect | New or updated resource that breaks the rule | Use it when |
|---|---|---|
| Audit | Allowed, but marked non-compliant and reported | You need visibility without blocking or changing anything |
| Deny | The create or update request is rejected | A configuration must be stopped, not just reported |
| Modify | Allowed, with a property added or corrected on the request (for example a missing tag) | You want Azure to fix the configuration automatically |
The difference between audit and deny matters whenever a requirement says something must not happen: audit only reports, so it does not meet a "must stop" requirement.
What happens to resources that already exist. When you assign a policy, Azure evaluates the resources that are already in scope and reports any that break the rule as non-compliant. It does not delete, stop or move them, even with the deny effect: deny only blocks new create or update requests. Neither audit nor deny ever changes a resource. To bring existing resources into line automatically, a policy with the modify effect (or one that deploys a missing setting) can be applied to them through a remediation task; for example, a modify policy that adds an environment tag, run through a remediation task, can tag resources created before the policy existed, with no scripts to write.
Policy initiatives: many rules managed as one
A policy initiative (also called a policy set) is a group of related policy definitions that work toward one goal, assigned and tracked as a single unit. Instead of assigning dozens of individual policies for a standard such as a security baseline or a regulatory framework, you assign one initiative and see one overall compliance result, with the detail for each rule underneath.
Initiatives simplify management in two ways. You assign them once at a scope, and inheritance carries them to everything below, just like single policies. And an assignment follows the current content of its initiative: if a definition is added to an initiative that is already assigned, the existing assignments start evaluating it without being re-created. Microsoft provides built-in initiatives for common standards, which is a fast way to measure an environment against a published benchmark.
Azure Policy vs RBAC: what versus who
One of the most reliable AZ-900 distinctions is between Azure Policy and role-based access control, because both sound like security controls. The distinction is clean: RBAC controls who can do things, and Azure Policy controls what is allowed.
RBAC grants people and applications permission to perform actions, such as letting a user read a storage account or letting an administrator create virtual machines. It is about identity and authorization. Azure Policy, by contrast, does not care who is acting; it evaluates the properties of the resource itself and allows, blocks or corrects the configuration. The two are complementary and often both apply to the same action.
| Aspect | Azure RBAC | Azure Policy |
|---|---|---|
| Controls | Who can perform actions | What configurations are allowed |
| Based on | Identity and assigned roles | Resource properties and rules |
| Example | User may create VMs | VMs may only be created in approved regions |
| Question it answers | Are you allowed to act? | Does the resource meet the rules? |
A practical way to remember it: a user might have every permission RBAC can grant, even Owner, yet still be blocked by a deny policy. RBAC says you are allowed to build; Policy says what you build must follow the rules.
Resource locks: prevent accidental changes
Resource locks protect important Azure resources from being accidentally deleted or modified, and they apply to every user and role, including Owners. A lock stops the action until someone deliberately removes the lock. Locks can be applied to a subscription, a resource group or an individual resource (not to a management group).
There are two lock types:
| Lock type | Read | Modify | Delete | Choose it when |
|---|---|---|---|---|
| CanNotDelete ("Delete" in the portal) | Allowed | Allowed | Blocked | Normal changes must continue, but nothing may be deleted |
| ReadOnly ("Read-only" in the portal) | Allowed | Blocked | Blocked | The configuration must not change at all |
Inheritance. A lock on a parent scope is inherited by every resource inside it, including resources created later: a CanNotDelete lock on a resource group also protects any storage account or virtual machine created in that group after the lock was applied. If locks conflict in the chain, the most restrictive one applies.
Removing a lock. A lock is not bypassed by a powerful role; the request simply fails while the lock is in place. To go ahead, a user who is allowed to manage locks first removes the lock as a separate step, then performs the action. Managing locks needs Microsoft.Authorization/locks permissions, which the built-in Owner and User Access Administrator roles have, regardless of who created the lock. Contributor does not: a Contributor can neither create nor remove locks at any scope, so a Contributor blocked by a lock needs someone with one of those roles.
What locks cover. Locks govern management operations on a resource (creating, changing, deleting it through Azure Resource Manager), not the use of the resource. Under a ReadOnly lock you can still sign in to a virtual machine or work with data in a database. Some operations that look like reads are blocked, though: a ReadOnly lock on a storage account prevents listing its access keys, so users who do not already have a key must use Microsoft Entra credentials to reach blob or queue data (keys already held keep working), and a ReadOnly lock on a resource group prevents starting or restarting its virtual machines. Locks protect resources, not the data inside them, so they are not a replacement for backups.
Azure Blueprints: retiring, and not on the exam
Azure Blueprints is not part of the current AZ-900 skills outline, and Microsoft is retiring it — a phased retirement began on 31 July 2026 and ends on 31 January 2027, with Deployment Stacks and template specs as the replacements. You may still see it in older study material, where it is described as a way to package role assignments, policy assignments, resource groups and templates into one repeatable definition.
What the exam actually tests are the building blocks it used to bundle: Azure Policy for what is allowed, RBAC for who can act, and resource locks for protecting critical resources. If a scenario describes applying governance consistently across many environments, reason about those individual controls rather than reaching for Blueprints.
Worked example: one scenario, three tools
Many real requirements need all three tools, each doing the job only it can do. Suppose a hospital group has three needs: prove to auditors which systems hold patient health records, across Azure Data Lake Storage and on-premises Oracle databases; make sure no storage account can ever be created that accepts unencrypted HTTP traffic; and protect the production virtual network from deletion while the network team continues to adjust its subnets.
Locating the sensitive data is Purview's job. Registering and scanning those sources in Microsoft Purview builds the data map, and classification labels the files and columns that hold health information, giving the auditors one place to see where it lives. Azure Policy cannot see inside data, and a lock does not report anything.
Preventing the configuration is Azure Policy's job, with the deny effect. A policy that requires secure transfer (HTTPS only), assigned at the subscription or a management group above it with deny, rejects any create or update request that would leave a storage account accepting HTTP, whatever RBAC role the requester holds. Audit would only list offending accounts, which does not satisfy a "must never" requirement. Accounts that already break the rule show as non-compliant; they are not deleted.
Protecting the virtual network is a lock's job, specifically CanNotDelete. The network team can keep changing subnets, but nobody can delete the network until a user with lock permissions, such as Owner or User Access Administrator, removes the lock. A ReadOnly lock would be the wrong choice because it would also block those routine changes.
The same reasoning applies to other rules: an allowed-locations policy with deny for data residency, a modify policy with a remediation task to add a missing tag to older resources, or a ReadOnly lock to freeze a firewall's settings during a change freeze.
Tip. Match each tool to its purpose. Searching for datasets across sources, finding where personal or financial data is stored, tracing data lineage or preventing data loss points to Microsoft Purview. Enforcing configuration rules on resources (allowed regions, required tags, allowed SKUs, HTTPS-only storage) points to Azure Policy; expect to choose between audit (report only), deny (block new non-compliant requests) and modify (correct a property), to know that existing non-compliant resources are reported, not deleted, and fixed with a remediation task, and that assignments and initiatives are inherited by child scopes and new resources. Preventing accidental deletion points to a CanNotDelete lock, freezing a configuration to ReadOnly; locks are inherited, apply even to Owners, and only roles such as Owner or User Access Administrator, not Contributor, can remove them. Expect the classic distinction that RBAC controls who can act while Azure Policy controls what is allowed, and scenarios that need Purview, Policy and a lock together.
- Microsoft Purview governs data across Azure, on-premises and other clouds: its data map and catalog find data, classification labels sensitive data, lineage shows how data flows, and data loss prevention helps stop sensitive data leaking.
- Azure Policy governs resource configuration with rules such as allowed regions, required tags, allowed SKUs and required settings like HTTPS-only storage.
- Audit reports non-compliance, deny rejects non-compliant create or update requests, and modify adds or corrects a property; only deny meets a "must stop" requirement.
- A new policy assignment reports existing non-compliant resources but never deletes them; a remediation task applies a modify policy to resources that already exist.
- Policy assignments and initiatives are inherited by every child scope and resource, including ones created later; an initiative groups related definitions so they are assigned and tracked as one.
- RBAC controls who can perform actions; Azure Policy controls what configurations are allowed, and both often apply together.
- CanNotDelete blocks deletion but allows changes; ReadOnly blocks changes and deletion. Locks are inherited from a parent scope, including by resources added later.
- Locks apply to everyone; only roles with lock permissions such as Owner or User Access Administrator (not Contributor) can remove one, as a separate step before the blocked action.
- Azure Blueprints is retiring (fully by 31 January 2027) and is not in the AZ-900 outline — governance questions test Azure Policy, RBAC and resource locks.
Frequently asked questions
What is the purpose of Microsoft Purview in Azure?
Microsoft Purview is a unified data governance and compliance service that helps an organization understand and protect its data across Azure, on-premises systems and other clouds. Its data map and catalog let people search for data assets, classification labels sensitive information such as personal or financial data, lineage shows how data flows between systems, and data loss prevention helps stop sensitive data being shared inappropriately.
What does Azure Policy do?
Azure Policy evaluates Azure resources against organizational rules, such as allowed regions, required tags, allowed VM sizes or HTTPS-only storage. Each policy's effect decides what happens to a non-compliant resource: audit reports it, deny blocks the create or update request, and modify adds or corrects a property. Assignments at a management group, subscription, resource group or individual resource are inherited by everything beneath them.
What happens to existing resources when a new Azure Policy is assigned?
Azure Policy evaluates the resources already in scope and marks any that break the rule as non-compliant on the compliance dashboard. It does not delete, stop or change them, even with the deny effect, which only blocks new create and update requests. To fix existing resources automatically, you use a policy with the modify effect and run a remediation task.
What is an Azure Policy initiative?
An Azure Policy initiative is a group of related policy definitions that work toward one goal, such as a security baseline or regulatory standard. It is assigned to a scope as a single unit and reports one overall compliance result. If a definition is added to an initiative that is already assigned, the existing assignments begin evaluating it without being re-created.
What is the difference between Azure Policy and RBAC?
Azure role-based access control (RBAC) controls who can perform actions, based on the roles assigned to a user or application. Azure Policy controls what configurations are allowed, based on the properties of the resource itself, regardless of who is acting. They are complementary: a user may have full RBAC permission, even Owner, to create a resource yet still be blocked by a deny policy.
What is the difference between CanNotDelete and ReadOnly resource locks?
CanNotDelete lets authorized users read and modify an Azure resource but prevents anyone from deleting it. ReadOnly is stricter: users can read the resource but cannot modify or delete it. Both apply to every user and role, and a lock placed on a subscription or resource group is inherited by all resources inside it, including resources created later.
Who can remove an Azure resource lock?
Removing or creating an Azure resource lock requires Microsoft.Authorization/locks permissions, which the built-in Owner and User Access Administrator roles have, whoever created the lock. The Contributor role cannot create or remove locks. Even an Owner cannot bypass a lock: the lock must be removed as a separate step before a blocked delete or change can succeed.
Is Azure Blueprints still on the AZ-900 exam?
No. Azure Blueprints is not in the current AZ-900 skills outline, and Microsoft is retiring it: a phased retirement began on 31 July 2026 and ends on 31 January 2027, with Deployment Stacks and template specs as the replacements. For the exam, focus on the controls Blueprints used to bundle — Azure Policy, RBAC and resource locks.
Source
This lesson covers the "Describe Azure management and governance" domain of the official AZ-900 exam guide. Vendors revise their guides — check the source for the current version.
- Microsoft AZ-900 study guide — Microsoft Learn
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.