Implement governance to enforce security and regulatory compliance
How the four governance controls fit together
A single requirement can arrive in four different shapes: stop anyone from creating a storage account that accepts anonymous traffic, stop the wrong people from touching production at all, stop everyone including the subscription owner from deleting the backup vault, and show an auditor how much of a compliance standard the environment currently passes. Those are four different controls, and reaching for the wrong one is the most common governance mistake in this objective.
Azure RBAC (role-based access control) decides which principals may perform which operations. Azure Policy decides which resource configurations are allowed, and can correct or deploy configuration itself. Resource locks, together with the vault-level protections in Azure Backup, refuse specific changes no matter who asks. Microsoft Defender for Cloud measures what already exists against a control set and reports the result; blocking is not its usual role, and it happens only where Deny or Enforce is turned on for one of the Azure recommendations that support it.
Which slice of the domain this page covers
The other two pages of this domain answer the questions that come first. Securing access with Microsoft Entra ID covers who can sign in and how an application obtains an identity; securing secrets and keys with Azure Key Vault covers where credentials, keys, and certificates live. This page starts after that point, with what an already-authenticated principal may build, change, or delete, and how the resulting estate is measured against a standard.
The scope ladder all four controls attach to
Every control here binds to the same Azure resource hierarchy[1]: management group, then subscription, then resource group, then the individual resource. A policy assignment or a role assignment placed at one level is inherited by every level beneath it, and the management group tree supports up to six levels of depth, not counting the root management group or the subscription level.
The levels are not interchangeable, and the figure below traces which control can attach at each one. A resource lock[2] cannot be placed on a management group at all, so a lock always starts at a subscription or lower. A Defender for Cloud security standard is normally enabled on a management group or subscription so that everything nested below aggregates into one compliance view.
Read the ladder as the answer to a single question: how far does this control reach? Almost every governance question in this objective is really asking you to pick the control type first, and then the level of that ladder where it binds.
Where a policy applies: definitions and scope
A policy definition is one rule: a condition that selects resources and an effect that says what happens to them. An initiative (also called a policy set) bundles related definitions so they are assigned, parameterized, and tracked as one unit, and an assignment[3] binds either object to a scope. Nothing is evaluated until an assignment exists, which is why an unassigned custom definition never affects a deployment.
Microsoft publishes built-in definitions for common controls, so a custom definition is written only when the required rule is specific to your organization. The figure below traces the whole path, from the definition through an optional initiative to an assignment, its evaluation, and the remediation task that repairs what already exists.
The pieces of a definition
The listing below is a complete custom definition body that blocks anonymous blob access. mode set to Indexed restricts evaluation to resource types that support tags and location, parameters declares values the assignment supplies later, and policyRule holds the if condition and the then effect. Nothing has been elided from it.
Custom policy definition: deny storage accounts that allow anonymous blob access
{
"properties": {
"displayName": "Storage accounts must disable anonymous blob access",
"mode": "Indexed",
"parameters": {
"effect": {
"type": "String",
"allowedValues": ["Audit", "Deny", "Disabled"],
"defaultValue": "Deny"
}
},
"policyRule": {
"if": {
"allOf": [
{ "field": "type", "equals": "Microsoft.Storage/storageAccounts" },
{ "field": "Microsoft.Storage/storageAccounts/allowBlobPublicAccess", "notEquals": false }
]
},
"then": { "effect": "[parameters('effect')]" }
}
}
}
The field value in the second condition is an alias[4], the name Azure Policy uses to reach a property inside the resource type's own API shape. The [parameters('effect')] expression reads the value the assignment supplies, which is what keeps one definition reusable across scopes that need different strictness.
Two scopes decide reach, not one
The definition location and the assignment scope are separate settings and both matter. A custom definition must be saved at a management group or subscription that is an ancestor of every scope you intend to assign it at, because it can only be assigned inside its own location's hierarchy; a shared management group is the usual home when several subscriptions need the same rule. The assignment scope[5] then selects the resources actually evaluated, and it reaches downward only. Assigning at one subscription never governs a sibling subscription in the same management group, however high the definition itself is saved.
Excluding a scope versus exempting a resource
Two mechanisms take something out of an assignment's reach, and they are not interchangeable. The assignment's notScopes property permanently removes a child scope from applicability, which suits an environment the rule was never meant to cover. A policy exemption[6] is a separate object that waives a specific resource or scope while keeping it visible in compliance reporting as Exempted, with an optional expiresOn timestamp after which the waiver lapses on its own.
Choose notScopes when nobody should ever have to look at that scope again, and an exemption when the exception itself has to stay auditable and time-bound.
Choosing an effect and remediating what exists
You have written the rule and chosen the scope, and one field is still unset: the one that decides whether a matching deployment is refused, recorded, or corrected on the spot. The effect is where enforcement lives. An assignment with the audit effect and an assignment with the deny effect can be identical in every other respect, and only one of them stops a deployment.
The effects this objective turns on
| Effect | What Azure Policy does | Choose it when |
|---|---|---|
deny | Rejects a create or update request that matches the condition | A prohibited configuration must never exist |
audit | Records the resource as noncompliant and lets the request through | You need visibility without breaking deployments |
modify | Adds, updates, or removes properties on the resource itself | A property such as a tag or a setting should be corrected in place |
deployIfNotExists | Deploys a related resource when the condition matches | A companion configuration such as a diagnostic setting must exist |
disabled | Turns off evaluation for that assignment | You are testing a definition and want no result at all |
Azure Policy defines further effects, including append, auditIfNotExists, denyAction, and manual; the five above are the ones this objective exercises. The full behavior of each is in the effect reference[7].
Why deny alone never cleans up an estate
Deny acts at request time, so it can only stop something that has not happened yet. Everything already deployed keeps its configuration and simply reports as noncompliant. Correction is the job of modify and deployIfNotExists, and those two need three things that deny does not.
First, the assignment needs a managed identity, either system-assigned or user-assigned, because Azure Policy performs the change as that identity rather than as the person who created the assignment. Second, that identity must hold the Azure roles named in the definition's roleDefinitionIds, which is the definition's own declaration of the permissions its change requires. Third, existing resources are only touched when you create a remediation task[8] for the assignment; without one, the effect fires only when a matching resource is next created or updated.
Evaluation timing and safe rollout
Compliance is re-evaluated when a resource in scope is created or updated, when the assignment changes, and otherwise on a standard cycle of about every 24 hours, with an on-demand scan available. A dashboard that has not caught up yet is a stale view, not a passing grade.
Before a deny rule goes wide, assign it at a limited scope and inspect the results. Setting the assignment's enforcementMode to DoNotEnforce evaluates compliance and reports it without applying the effect, so you learn how many resources the rule would have blocked before it blocks anything. That is the difference between a governance rollout and a self-inflicted deployment outage across the tenant root.
Role assignments and least-privilege remediation
Azure RBAC[9] is additive, and that single sentence explains most of the wrong answers people give about it. Effective permissions are the union of every role assignment that applies at every scope in the chain, so a narrower assignment can never trim a broader inherited one. Contributor at the subscription plus Reader on one resource group is still Contributor on that resource group.
A role assignment binds exactly three things: a principal (a user, a group, a service principal, or a managed identity), a role definition, and a scope. Change any one of them and you change the grant. Assignments are subject to real limits, currently 4,000 role assignments per subscription and 500 per management group[10], which is one reason group-based assignment beats per-user assignment at scale.
The only construct that subtracts is a deny assignment, and those are created by Azure itself, for example by a deployment stack or a managed application. A deny assignment belongs to Azure RBAC and settles who may act; it is not the Azure Policy deny effect from the previous section, which settles which configuration may exist. Administrators cannot author them, so "add a deny assignment" is never the answer to an overprivileged user.
Start from the built-in roles
Four built-in roles[11] apply to every resource type: Owner (full management plus the ability to assign roles), Contributor (full management but no role assignment), Reader (view only), and User Access Administrator (manage user access, including assigning Owner, but not the resources themselves). Role Based Access Control Administrator is the newer, narrower alternative to User Access Administrator: it assigns roles but cannot grant access by other means such as Azure Policy. Beyond those four, Azure ships hundreds of service-specific built-in roles, and the correct starting move is always to search for one that already contains the required operations.
The classic subscription administrator roles, Account Administrator, Service Administrator, and Co-Administrator, are retired[12], so access is managed exclusively through role assignments now.
Finding and fixing overprivileged access
Microsoft Defender for Cloud surfaces identity and access recommendations that flag patterns such as a service principal holding an administrative role at subscription scope, or privileged accounts that never use their permissions. Its risk prioritization[13] sorts those findings by the resource's context rather than by severity alone, which matters because the two orderings disagree often. Note the boundary: recommendations come with the foundational CSPM plan, but the risk-prioritization columns require the Defender CSPM plan.
Remediation follows from the additive model. Because nothing subtracts, adding Reader on top of an Owner assignment changes nothing at all, and neither does a narrower assignment lower down. The fix is to remove the broad assignment and replace it with the least-privileged role at the smallest scope that still covers the workload's verified operations.
Custom roles across the directory and Azure planes
A custom role is the answer only when no built-in role expresses the required permissions, and the first decision is which plane the permissions live on. Microsoft Entra roles[12] govern the directory: users, groups, applications, and their objects, scoped to the tenant, an administrative unit, or a single object. Azure RBAC roles govern Azure Resource Manager: subscriptions, resource groups, and resources. The two are separate authorization systems, and neither leaks into the other by default. A Global Administrator has no access to Azure resources, and an Azure custom role never becomes assignable as a directory role.
Anatomy of an Azure custom role definition
An Azure custom role[14] is a JSON document with four permission arrays and one scope array. Actions holds control-plane operations (managing the resource through Resource Manager), DataActions holds data-plane operations (reading or writing the data inside it), NotActions and NotDataActions subtract from those, and AssignableScopes limits where the role may be assigned at all.
Azure custom role definition, as accepted by az role definition create
{
"Name": "AI Guardrail Operator",
"IsCustom": true,
"Description": "Read AI account configuration and manage its diagnostic settings.",
"Actions": [
"Microsoft.CognitiveServices/accounts/read",
"Microsoft.Insights/diagnosticSettings/read",
"Microsoft.Insights/diagnosticSettings/write"
],
"NotActions": [],
"DataActions": [],
"NotDataActions": [],
"AssignableScopes": [
"/subscriptions/00000000-0000-0000-0000-000000000000"
]
}
NotActions is the field readers most often misread. It subtracts only from the wildcard grants inside this same role definition; it is not a deny rule. If another assignment grants the same operation, the user still has it, because the union across assignments is computed after each role definition resolves its own NotActions. That is the additive model from the previous section, restated at the level of a single definition.
AssignableScopes is the other quiet trap. A role definition whose assignable scope is one subscription cannot be assigned in a second subscription, even when both sit under the same management group. Widening the reach means editing AssignableScopes to a shared management group, not creating a second assignment.
Microsoft Entra custom roles
A Microsoft Entra custom role[15] is built from the directory's own permission catalog and is assigned at the tenant, an administrative unit, or a single directory object such as an app registration. It cannot contain Azure DataActions, and it cannot be assigned at a subscription or resource group. Assigning a Microsoft Entra custom role requires a Microsoft Entra ID P1 licence for each user who holds one, which built-in directory roles do not require.
The one bridge between the planes
Azure provides exactly one default bridge, and it is a recovery tool rather than a design pattern. A Global Administrator can turn on access management for Azure resources[16], which assigns that administrator the User Access Administrator role at root scope (/), covering every subscription and management group in the tenant. Use it to repair a subscription whose owners were all removed, then remove the root-scope assignment or turn the setting back off. Left on, it is a standing tenant-wide grant that no resource-level review will show you.
Resource locks and the control-plane boundary
A resource lock[2] does not check permissions, it overrides them. An Owner who holds every relevant Action is still refused while the lock is in place, which is exactly the point: locks defend against a mistake made by someone who is fully entitled to make it.
There are two levels. CanNotDelete allows reading and modifying the resource but refuses deletion. ReadOnly refuses updates as well, leaving behaviour equivalent to the Reader role. Locks placed on a subscription or resource group are inherited by everything within, and where several locks apply, the most restrictive one in the chain wins. Owner and User Access Administrator hold the Microsoft.Authorization/locks/* permissions needed to create or remove them: lock management lives in the Microsoft.Authorization namespace, which is why the role that manages access rather than resources appears in that list. Locks cannot be applied to management groups.
The figure below places the lock in the order a control-plane request is checked, after the permission check and the policy evaluation, immediately before Resource Manager applies the change.
What "control plane" excludes, precisely
A lock covers operations that go to Azure Resource Manager, and nothing else. Deleting a blob, purging a Key Vault secret, or dropping a table are data-plane operations that reach the service's own endpoint directly, so a ReadOnly lock on a storage account does not stop a single blob from being deleted. Protecting stored data is the job of that service's own features, such as blob soft delete and versioning, immutability policies, or Key Vault purge protection.
The reverse surprise is also worth knowing. Because a lock blocks the POST method to Resource Manager, ReadOnly blocks operations that read nothing at all in the intuitive sense: listing storage account keys is a POST, and so is restarting a virtual machine. A lock also stops a complete-mode ARM or Bicep deployment[17], because complete mode deletes resources the template omits.
Treat a lock as protection against deletion and reconfiguration through Resource Manager, and pair it with a data-plane protection whenever the thing you actually care about is the data.
Azure Backup security controls
Backup is the control an attacker attacks last and a governance review notices last. Azure Backup answers that with layers that stay effective after an administrator account is fully compromised, and each layer covers a different move the attacker would make.
Separate the duties first
Assign the Azure Backup built-in roles[18] at vault scope: Backup Contributor to manage backups without deleting the vault, Backup Operator to run backups and restores without altering the backup policy, and Backup Reader to monitor. Subscription Owner is never a requirement for routine backup work, and granting it converts one stolen credential into a whole-subscription problem.
Require a second authorization for critical operations
Multi-user authorization[19] (MUA) makes the vault check a second Azure resource, the Resource Guard, before it performs a critical operation. Disabling soft delete and removing MUA protection are mandatory protected operations; optional ones include deleting protection, reducing retention in a backup policy, changing encryption settings, and disabling immutability. The figure below traces one such request.
The protection only works when the guard is genuinely out of the vault administrator's reach. The Resource Guard must be owned by a different user, ideally in a different subscription or tenant, and the vault administrator must not hold Contributor, Backup MUA Admin, or Backup MUA Operator permissions on it. A backup administrator with full vault permissions but no Backup MUA Operator role on the guard simply cannot perform the protected operations. The Yes branch in the figure is therefore the path of a caller who does hold sufficient permission on the guard, which by design is not the vault administrator.
Keep deletion reversible and retention irreversible
Soft delete retains deleted backup data so it can be recovered, and it is now enforced by default[20] as part of secure-by-default assurance, generally available for Recovery Services vaults across Azure public regions and national clouds, and in preview for Backup vaults. Where the enforcement applies, the soft-delete state can no longer be changed in the portal. The retention period is 14 days by default and can be extended to 180 days.
Immutable vault[21] attacks the other direction: it blocks operations that would shorten retention or delete protected data before its time, and the setting itself can be locked to make that irreversible. Enabled-and-locked immutability is generally available in all Azure regions for Recovery Services vaults. Soft delete, immutability, and MUA are complementary rather than alternatives, which is why Microsoft's own guidance pairs them.
Encryption, network path, and monitoring
Backup data is encrypted at rest with platform-managed keys by default, with no action required. Use customer-managed keys[22] stored in Azure Key Vault only when the organization must control the key itself. Private endpoints[23] for a Recovery Services vault keep backup and restore traffic off public IP addresses, but the supported scenarios are specific, covering SQL Server and SAP HANA in Azure VMs and on-premises servers using the MARS agent among the documented cases, so do not assume every workload takes that path. Finally, built-in monitoring and alerts[24] plus Backup Reports are what turn all of the above into something you notice: they surface unusual restore activity and administrative changes while there is still time to react.
Standards and recommendations in Defender for Cloud
Defender for Cloud's main job on this page is measurement: it assesses, scores, and recommends, and every one of its compliance numbers is produced by Azure Policy underneath. It can also block, but only where Deny or Enforce is turned on for one of the supported Azure recommendations, so blocking here is an opt-in on named recommendations rather than something a standard does by itself. Understanding that Azure Policy dependency answers most exam questions about it.
Standards are policy initiatives with a dashboard
Industry frameworks, regulatory frameworks, and benchmarks appear in Defender for Cloud as security standards[25], each made of compliance controls that group related recommendations. The Microsoft Cloud Security Benchmark[26] is applied automatically when an account is onboarded and acts as the default baseline; other standards are added when the organization needs mappings to a specific framework.
Assign a standard at the highest applicable management group or subscription so compliance data is aggregated and tracked for nested resources, which requires Owner or Policy Contributor permission at that scope.
Two reporting behaviours surprise people. A control that cannot be assessed automatically appears greyed out rather than failed, because Defender for Cloud will not guess. And a standard assigned to a subscription with no relevant resources does not appear in the dashboard at all.
Recommendations, and what ranks them
Security recommendations[27] are the actionable half: each names the affected resources and the fix. Their ordering is the part worth learning, because Defender for Cloud ranks by risk derived from the resource's context, including internet exposure, sensitive data, possible lateral movement, and attack paths, rather than by a static severity label. As noted in the role section, that risk view requires the Defender CSPM plan; recommendations themselves come with the foundational plan.
When a recommendation genuinely does not apply, exempt the resource[28] rather than ignoring the finding, so the exception is recorded and stays visible.
What the compliance percentage is not
The regulatory compliance dashboard[29] reports how your resources score against the assessments in an assigned initiative. It is an internal measurement, useful for finding gaps and producing evidence, and it is not a certification issued by Microsoft. Formal attestation still comes from an external audit, and a stem that offers "the compliance score proves the organization is certified" is offering a distractor.
Governance as code and pipeline scanning
Everything on this page can be clicked once in a portal and lost on the next environment. The durable version expresses each control in the deployment itself, keeps the governance artifacts in source control, and checks both before anything reaches production.
Put the security properties in the template
Managed identities, private access, diagnostic settings, purge protection, and role or policy assignments are all deployable resource properties, so an ARM template, a Bicep file, or a Terraform configuration can carry them. Doing so makes posture a property of the code rather than of whoever deployed it, and it makes a difference visible in a pull request review.
Secrets are the exception that needs its own handling. Never place a password, key, or connection string in a template or a parameter file. ARM and Bicep support Key Vault references in parameter files[30], which pass a secure value by reference at deployment time, and a deployment identity with its own role assignment removes the need for many credentials entirely.
Treat policy artifacts as code
Policy as Code[31] means storing custom definitions, initiatives, assignments, parameter values, and exemptions in a repository and deploying them through a controlled pipeline. The gain is not the automation, it is the history: every change to a governance rule arrives as a reviewable diff, and the same artifact promotes from a test scope to production instead of being recreated by hand. This is also what makes the limited-scope validation from the effects section repeatable rather than a one-off.
Scan the templates before deployment
Microsoft Security DevOps[32] (MSDO) runs as a GitHub action or an Azure DevOps extension and analyzes source code, artifacts, containers, and infrastructure as code. Restricting it to the IaC category keeps the pipeline fast when template misconfigurations are what you are hunting.
GitHub Actions workflow running Microsoft Security DevOps on IaC only
name: MSDO
on:
push:
branches: [ main ]
jobs:
sample:
runs-on: windows-latest
permissions:
contents: read
id-token: write
actions: read
steps:
- uses: actions/checkout@v3
# Run only the infrastructure-as-code analyzers; drop `categories` to run them all.
- name: Run Microsoft Security DevOps
uses: microsoft/security-devops-action@latest
id: msdo
with:
categories: 'IaC'
# ... optional step to upload results to the code-scanning tab omitted
The categories input takes a comma-separated list whose accepted values are code, artifacts, IaC, and containers, and it defaults to all of them; the IaC scanning guide[33] shows the Azure DevOps pipeline equivalent. Findings land in the repository, where the fix is a template change, rather than in a postdeployment assessment where the fix is a change to a resource that is already running.
Exam pattern recognition
SC-500 governance questions are usually built by describing a symptom and offering one answer from each of the four control families. Recognising which family the symptom belongs to eliminates two or three options before you evaluate any detail.
Stems and the discriminator that settles them
"Resources keep being created without . What should you do?" The requirement is about configuration, so it is Azure Policy, and the discriminator is the verb. Must never be created means the deny effect. Must be reported means audit. Must be corrected on existing resources means modify or deployIfNotExists plus a remediation task. Role assignments are the decoy here: no role expresses "resources must have this property".
"The policy is assigned to Sub1 but Sub2 is still noncompliant." Assignment scope reaches downward only. Re-assign at the management group that is the common ancestor. A definition saved at a management group does not help by itself; saving and assigning are different scopes, and only the assignment governs.
"A managed identity was created but existing resources are unchanged." The assignment fires on create or update. The missing step is the remediation task, and the second thing to check is whether that identity holds the roles from the definition's roleDefinitionIds.
"An admin must not delete the resource, but must still manage it." CanNotDelete. If the stem instead says no changes at all, ReadOnly. If the stem is about deleting blobs, secrets, or rows, no lock qualifies, because that is the data plane.
"A user has Owner at the subscription. Add Reader on the resource group so they only read." Impossible: Azure RBAC is additive. So is the NotActions variant, where an operation added to NotActions is expected to override a grant from another assignment. Both fail for the same reason, and the correct answer removes or re-scopes the broad assignment.
"Create a Microsoft Entra custom role that grants blob data access." Wrong plane. Directory roles cannot carry Azure DataActions; that requires an Azure custom role, whose AssignableScopes must also include the target subscription.
"The Global Administrator cannot see the subscription." Expected behaviour, not a defect. The recovery path is elevating access to gain User Access Administrator at root scope, used temporarily and turned off afterwards.
"Prevent the backup admin from disabling soft delete." Multi-user authorization with a Resource Guard the admin has no permissions on. A resource lock on the vault is the classic distractor: it is not scoped to security-setting changes and it is removable by an Owner.
"Show the auditor our ISO 27001 posture." Enable the standard in Defender for Cloud at the management group. Watch for the option that treats the resulting percentage as a certification, and for the one that enables the standard on each resource group and expects aggregation.
"Stop insecure templates from reaching production." Microsoft Security DevOps with the IaC category in the pipeline. Runtime threat protection is the distractor, because it inspects deployed resources rather than the template that produced them.
One habit covers all of them: read the stem for the noun it is protecting, a configuration, a permission, an existing resource, or a report, and let that noun choose the control family before you compare the specific options.
Where each governance control binds and what it can actually stop
| Governance question | Azure RBAC | Azure Policy | Resource locks and vault protections | Defender for Cloud standards |
|---|---|---|---|---|
| What it governs | Which principals may perform which operations | Which resource configurations are allowed or corrected | Which control-plane changes are refused regardless of permission | How assessed resources score against a control set |
| Where it binds | Role assignment at management group, subscription, resource group, or resource | Assignment at management group, subscription, or resource group, minus any notScopes | Lock on a subscription, resource group, or resource, inherited downward; not available on management groups | Standard enabled on a management group or subscription |
| Effect on a noncompliant create | Request fails when the caller's assignments do not include the operation | Blocked only when the effect is deny; audit records it and allows it | CanNotDelete allows create and update, ReadOnly refuses the update | Deny can block the deployment for supported Azure recommendations; otherwise the assessment reports the resource as noncompliant |
| Fixes resources that already exist | No, permission changes apply to future operations only | Yes, through modify or deployIfNotExists plus a remediation task | No, a lock preserves the current state rather than changing it | For recommendations with the Fix option, the suggested fix can be applied to affected resources |
| Behavior for a subscription Owner | Owner passes every permission check at that scope | A deny effect rejects the Owner's request as well | The lock blocks the Owner until the lock is removed | The score is unaffected by which role the caller holds |
| Reach into data-plane operations | Yes, through DataActions in the role definition | Evaluates Resource Manager properties, not the data stored in a resource | None, locks are control-plane only | Assessments read configuration, not stored data |
Decision tree
Sharp facts the exam loves — give these one last read before exam day.
Cheat sheet
Sharp facts the exam loves — scan these before test day.
- Use built-in policy definitions unless the required rule needs a custom definition
A policy definition contains the condition and effect applied to matching resources; Microsoft supplies built-ins for common controls, while custom definitions implement organization-specific requirements. Group related definitions into an initiative when they should be assigned and tracked together.
Trap Create separate role assignments for every resource instead of defining a repeatable configuration rule.
4 questions test this
- Your company has an Azure subscription named Sub1. A new internal standard requires that the name of every Azure Storage account created in Sub1 begin with the string sec, and that a request submittin
- You have a custom policy definition named AllowedRegions that restricts the Azure regions in which resources can be created. Three business units each use a separate Azure subscription, and each unit
- Your company has a management group named MG-AI that contains four Azure subscriptions. Your security baseline for AI workloads consists of 12 policy definitions: nine Microsoft built-ins and three cu
- You have an Azure subscription named Sub1 that contains several Azure Storage accounts. A new control states that a storage account in Sub1 must never be created or updated with public blob access ena
- Policy assignment scope determines which descendants are evaluated
Assign a policy at the management group or subscription that is the common ancestor of all intended resources, and use notScopes to exclude a resource group that must remain outside applicability. Assigning at one subscription cannot cover sibling subscriptions in the management group.
Trap Assign the definition to one subscription and expect it to govern every subscription under the same management group.
5 questions test this
- Your tenant root group contains a management group named MG-Landing and two subscriptions that are direct children of the root group. MG-Landing contains two child management groups named MG-Corp and
- A policy initiative that audits storage account network configuration is assigned to a management group named MG1, which contains a subscription named Sub2. One storage account in Sub2 must keep publi
- An initiative that contains a deployIfNotExists definition is assigned to a management group named MG1 with a system-assigned managed identity, and MG1 contains four subscriptions. Compliance results
- A management group named MG-Corp contains five production subscriptions and a new sandbox subscription named Sub6. The built-in Allowed resource types definition is assigned to MG-Corp with the deny e
- Your Azure environment contains a management group named MG-Prod that contains three subscriptions named Sub1, Sub2, and Sub3. A policy definition that requires private endpoints on Microsoft Foundry
- Azure Policy effects distinguish prevention from assessment and correction
Use deny to reject noncompliant create or update requests, audit to record noncompliance without blocking, and modify or deployIfNotExists when Azure should alter or deploy a related configuration. A policy's effect, not merely its assignment, determines whether a new deployment is prevented.
Trap Choose Audit when a prohibited public endpoint must be blocked at deployment time.
2 questions test this
- Your Azure environment contains a management group named MG-Sec that contains four Azure subscriptions. The subscriptions hold the Azure key vaults that store the customer-managed keys for production
- Your Azure environment contains a management group named MG1 whose subscriptions host the resources of 30 application teams. A policy definition that requires the DataClassification tag to hold one of
- Resource locks override role permissions for control-plane changes
A CanNotDelete lock allows authorized modifications but blocks deletion, whereas ReadOnly also blocks updates; parent-scope locks are inherited and the most restrictive lock wins. Locks affect Azure control-plane operations, not service data-plane writes or deletes.
Trap Apply a ReadOnly lock to a storage account to prevent deletion of blobs through the data-plane endpoint.
4 questions test this
- Your Azure environment contains a management group named MG-Sec that contains four Azure subscriptions. The subscriptions hold the Azure key vaults that store the customer-managed keys for production
- You have an Azure subscription named Sub1 that contains a resource group named RG-IR. RG-IR holds the disks of a quarantined virtual machine and an Azure key vault named KV-Forensics. Until an investi
- You have an Azure subscription named Sub1 that contains a resource group named RG-Test. A service principal named SP1 runs a nightly pipeline that deletes and recreates the test resources in RG-Test.
- You have an Azure subscription named Sub1 that contains a resource group named RG-Prod. RG-Prod holds an Azure key vault, two storage accounts, and a Log Analytics workspace, and the platform team add
- Use policy exclusions for permanent bypasses and exemptions for tracked exceptions
Use an assignment's notScopes for a permanent, broad bypass such as an environment that does not require the governance rule. Use a policy exemption for a waiver or mitigation that must remain visible as Exempted in compliance reporting and can expire through expiresOn without modifying the assignment.
4 questions test this
- Your Azure environment contains a management group named MG-Prod. A policy assignment on MG-Prod uses the deny effect to block the creation of virtual machines that use unapproved sizes. During a majo
- You have an Azure subscription named Sub1 that contains a storage account named storage1 that holds legal-hold evidence. storage1 must keep public network access enabled until the case closes at the e
- Your company has a management group named MG-Corp that contains four production subscriptions and a subscription named Sub-Dev that hosts short-lived developer sandboxes. A policy initiative that enfo
- Your company has a management group named MG-AI that contains three Azure subscriptions. An initiative that contains nine policy definitions is assigned to MG-AI to enforce your AI workload baseline.
- Authorize the policy assignment identity before remediating existing resources
A modify or deployIfNotExists assignment needs a system-assigned or user-assigned managed identity with the minimum Azure roles required by the policy's roleDefinitionIds. After assignment, create a remediation task to apply the modify operations or deployment template to existing noncompliant resources; assignment alone corrects resources only when the effect is triggered during applicable create or update activity.
5 questions test this
- You have an Azure subscription named Sub1. An initiative that contains three deployIfNotExists definitions is assigned to Sub1 with a system-assigned managed identity that already holds every role the
- You have an Azure subscription named Sub1 that contains 60 Azure key vaults. An initiative assigned to Sub1 includes a definition that checks whether each key vault sends its logs to a Log Analytics w
- You have an Azure subscription named Sub1. A deployIfNotExists assignment on Sub1 deploys a diagnostic setting to every new Azure key vault, and its system-assigned managed identity holds the roles th
- Your company creates every Azure Policy assignment from an Azure DevOps pipeline that calls the Azure CLI, and never from the Azure portal. An initiative that contains deployIfNotExists definitions is
- You have an Azure subscription named Sub1 that contains 200 virtual machines. To preview the impact of a new baseline, you assigned a deployIfNotExists definition to Sub1 with the enforcement mode set
- Save a custom policy definition above every intended assignment scope
Save a custom policy definition at a subscription or management group that is an ancestor of every intended assignment target, because the definition can target only resources within its location's hierarchy. Use a shared management group as the definition location when assignments must span multiple descendant subscriptions.
- Supply business-specific policy parameter values at assignment time
Define variable compliance values as parameters in a policy or initiative definition, then provide the required values in each assignment. This keeps the rule logic reusable while allowing different assignment scopes to enforce different business values or outcomes.
- Defender for Cloud evaluates regulatory standards through policy initiatives
Regulatory compliance standards in Defender for Cloud are backed by Azure Policy initiatives and are continuously assessed at their assigned scopes. The dashboard reports compliant and noncompliant resources by standard and links failed assessments to remediation guidance.
Trap Treat a displayed compliance score as an external certification issued by Microsoft.
8 questions test this
- You have an Azure subscription named Sub1 that Microsoft Defender for Cloud assesses against two regulatory standards. A compliance officer must be emailed within minutes whenever any regulatory compl
- Your company has workloads in an Azure subscription named Sub1, in an Amazon Web Services (AWS) account, and in a Google Cloud Platform (GCP) project, and all three are onboarded to Microsoft Defender
- You have an Azure subscription named Sub1 that Microsoft Defender for Cloud assesses against three regulatory standards. Your company's third-party governance platform must consume a weekly point-in-t
- You have an Azure subscription named Sub1 where Microsoft Defender for Cloud is enabled but no Defender plan is turned on, so the Regulatory compliance dashboard shows only the Microsoft Cloud Securit
- Your company has an Azure subscription named Sub1 that Microsoft Defender for Cloud assesses against two regulatory standards. The risk committee wants a view in the Azure portal showing how Sub1's co
- Your company has a management group named MG1 that contains 12 Azure subscriptions, and two more subscriptions are moved into MG1 each quarter. Every subscription has a paid Microsoft Defender for Clo
- You have an Azure subscription that Microsoft Defender for Cloud assesses against a regulatory standard, and the Regulatory compliance dashboard currently reports that most of the standard's controls
- You have an Azure subscription named Sub1 that contains 30 virtual machines. Microsoft Defender for Cloud assesses Sub1 against the Microsoft Cloud Security Benchmark, and one recommendation reports 8
- Assign each security standard at the highest applicable governance scope
Enable a standard on the relevant management group or subscription so nested resources are aggregated and assessed consistently, supplying any required initiative parameters. Owner or Policy Contributor permission is required to add a standard.
Trap Enable the standard independently on every resource group to obtain management-group aggregation.
5 questions test this
- Your company has a management group named MG1 that contains 12 Azure subscriptions. The PCI DSS v4.0.1 standard is turned on for MG1, and the Regulatory compliance page aggregates the control results
- Your company has a management group named MG-Corp with two child management groups: MG-Prod, which contains eight Azure subscriptions, and MG-Divest, which contains three subscriptions that belong to
- Your Microsoft Entra tenant contains a management group named MG-Prod that holds 15 Azure subscriptions, and the NIST CSF v2.0 standard is turned on for MG-Prod. Application teams create new Azure sub
- Your company manages its Amazon Web Services (AWS) estate with AWS Organizations: one management account and 45 member accounts, with two or three member accounts added every quarter. The AWS security
- You have a Microsoft Entra tenant with a management group named MG1 that contains nine Azure subscriptions, and three further subscriptions sit outside MG1. Over the past year several engineers turned
- Microsoft Cloud Security Benchmark supplies the default Defender posture baseline
When cloud accounts are onboarded, Defender for Cloud enables the Microsoft Cloud Security Benchmark and assesses resources against its controls. Add regulatory or custom standards when the organization needs mappings beyond that default security baseline.
6 questions test this
- Your company has an Azure subscription named Sub1 that contains Microsoft Foundry resources used by a customer-facing AI assistant. Microsoft Defender for Cloud is enabled on Sub1 with the Defender Cl
- Your company has a management group named MG1 that contains an Azure subscription named Sub1. Microsoft Defender for Cloud assesses Sub1 against the Microsoft Cloud Security Benchmark, and your compli
- Your company has an Azure subscription named Sub1 and an Amazon Web Services account named AWS1. A colleague created a security connector for AWS1 in Microsoft Defender for Cloud and enabled the Defen
- You have an Azure subscription named Sub2 that is onboarded to Microsoft Defender for Cloud with the Defender Cloud Security Posture Management (CSPM) plan. Last month you turned the SWIFT Customer Se
- You have an Azure subscription named Sub1 that is onboarded to Microsoft Defender for Cloud. A Microsoft Cloud Security Benchmark recommendation repeatedly reports storage accounts in Sub1 that allow
- Your company has an Azure subscription named Sub1 that is onboarded to Microsoft Defender for Cloud with the Defender Cloud Security Posture Management (CSPM) plan. The compliance team recently turned
- Defender recommendations prioritize remediation using resource context
Security recommendations provide actionable fixes from continuous assessments and rank risk using factors such as internet exposure, sensitive data, lateral movement, and attack paths. Review affected resources and business impact before remediating or granting an exemption; severity alone is not the full contextual risk score.
7 questions test this
- You have a Microsoft Entra tenant that contains three Azure subscriptions named Sub1, Sub2, and Sub3, all onboarded to Microsoft Defender for Cloud with the Defender Cloud Security Posture Management
- You have a Microsoft Entra tenant that contains three Azure subscriptions named Sub1, Sub2, and Sub3, all onboarded to Microsoft Defender for Cloud with the Defender Cloud Security Posture Management
- You have an Azure subscription named Sub1 and a management group named MG1 that are onboarded to Microsoft Defender for Cloud. An internal auditor asks for one list of every exemption rule that is cur
- You have an Azure subscription named Sub1 that is onboarded to Microsoft Defender for Cloud. A recommendation for Sub1 reports 40 unhealthy production resources and offers a Fix option that can remedi
- You have an Azure subscription named Sub1 that is onboarded to Microsoft Defender for Cloud with the Defender Cloud Security Posture Management (CSPM) plan. The Recommendations page lists more than 60
- Your company has a management group named MG-Lab that contains six Azure subscriptions used only for an isolated training lab. Microsoft Defender for Cloud reports one Microsoft Cloud Security Benchma
- Your company has an Azure subscription named Sub1 and an Amazon Web Services account named AWS1 that are onboarded to Microsoft Defender for Cloud. Overnight, the secure score of the environment dropp
- An Azure role assignment binds a principal, role definition, and scope
Select the narrowest built-in role that contains the required actions, assign it to the user, group, service principal, or managed identity, and scope it no higher than necessary. Assignments at management group, subscription, and resource-group levels flow to descendant Azure resources.
Trap Grant Owner at the subscription because the task spans two resources in one resource group.
6 questions test this
- Your company has an Azure subscription named Sub1 that contains a Microsoft Foundry resource named Foundry1. A Foundry project named Project1 hosts four published agents, and a partner web application
- Your Azure environment contains a management group named MG-Sec that currently holds two subscriptions, and finance plans to add three more subscriptions to MG-Sec next quarter. A Microsoft Entra grou
- Your Azure environment contains a management group named MG-Gov that holds two subscriptions named Sub1 and Sub2. Sub1 contains two resource groups named RG-AI and RG-Data. A workload identity named S
- You have an Azure subscription named Sub1 that contains a resource group named RG-Images with a container registry named acr1. To cover a combination of operations that no built-in role provides, you
- You have an Azure subscription named Sub1 that contains a resource group named RG1. RG1 contains three key vaults named KV1, KV2, and KV3, and an Azure Functions app named Func1 that has a system-assi
- You have an Azure subscription named Sub1 that contains a resource group named RG-AI. A team lead named User1 must be able to add and remove Azure role assignments for the developers who work on the r
- Create an Azure custom role only when built-in roles cannot express the required permissions
Define control-plane permissions in Actions and data-plane permissions in DataActions, then constrain where the role can be assigned with AssignableScopes. NotActions and NotDataActions subtract from wildcard grants in that role definition; they are not explicit deny rules against permissions obtained from another assignment.
Trap Add an operation to NotActions and expect it to override the same operation granted by another role.
5 questions test this
- Your Microsoft Entra tenant contains two Azure subscriptions named Sub1 and Sub2 that belong to different management groups. An Azure custom role named AI Guardrail Operator was created with Sub1 as t
- Your Microsoft Entra tenant contains two Azure subscriptions named Sub1 and Sub2 that belong to different management groups. An Azure custom role named AI Guardrail Operator was created with Sub1 as t
- Your Azure environment contains a management group named MG-Data that holds four subscriptions. A monitoring team needs a set of storage permissions that no built-in role expresses, so you create an A
- You have an Azure subscription named Sub1 that contains a resource group named RG-Images with a container registry named acr1. To cover a combination of operations that no built-in role provides, you
- Your company has a Microsoft Entra tenant that includes Microsoft Entra ID P1 licenses, and an Azure subscription named Sub1. A developer named User1 must be able to manage the credentials and the red
- Microsoft Entra custom roles and Azure custom roles govern different resource planes
Use a Microsoft Entra custom role for supported directory permissions and object scopes, and an Azure custom role for Azure Resource Manager and service data actions. A custom directory role does not become assignable at an Azure subscription or resource group.
Trap Create a Microsoft Entra custom role containing Storage blob DataActions.
5 questions test this
- You have an Azure subscription named Sub1 that contains a Microsoft Foundry resource named Foundry1 with a project named Project1. A workload identity named SP-Ops runs a release pipeline that must pu
- Your company has a Microsoft Entra tenant and an Azure subscription named Sub1 that contains a resource group named RG-AI. A platform team must be able to restart the container apps in RG-AI and read
- Your company has a Microsoft Entra tenant that includes Microsoft Entra ID P1 licenses, an app registration named App1, and a group named Agent-Devs whose members build AI agents. You create a Microso
- You have an Azure subscription named Sub1 that contains a Microsoft Foundry agent and an Azure AI Search service named Search1. The agent grounds its answers on a single index in Search1 and currently
- Your Microsoft Entra tenant contains an app registration named App1 and a workload identity named SP-Rotate that a nightly job uses to replace the expiring client secrets of App1. You create a Microso
- Identity recommendations should drive removal of unnecessary administrative access
Use Defender for Cloud identity and access recommendations to identify risky patterns such as service principals holding administrative roles at subscription or resource-group scope. Validate the workload's required operations, replace the assignment with the least-privileged role and scope, and remove unused privileged grants.
Trap Leave the administrative assignment in place and add Reader because the combined roles include least privilege.
5 questions test this
- You have an Azure subscription named Sub1 that is onboarded to Microsoft Defender for Cloud with the Defender CSPM plan enabled. The identity and access recommendations flag a service principal named
- Your company has three Azure subscriptions in a management group named MG-Prod, all onboarded to Microsoft Defender for Cloud with the Defender CSPM plan enabled. The identity and access recommendatio
- You have an Azure subscription named Sub1 that contains a Microsoft Foundry resource named Foundry1. Microsoft Defender for Cloud raises the recommendation that service principals should not be assign
- Your Azure subscription named Sub1 contains three service principals named SP1, SP2, and SP3 that each hold the Contributor role at the Sub1 scope, and the Microsoft Defender for Cloud identity and ac
- You have an Azure subscription named Sub1 that contains a resource group named RG-Sec, and your tenant has Microsoft Entra ID P2 licenses. Four security engineers hold the User Access Administrator ro
- Elevate a Global Administrator only temporarily for Azure access recovery
Microsoft Entra Global Administrator does not itself grant access to Azure resources because directory roles and Azure RBAC are separate authorization systems. For emergency recovery, enabling Azure resource access assigns that administrator User Access Administrator at root scope (/); remove the root assignment or turn the setting off as soon as the required role assignments are repaired.
5 questions test this
- Your company has a Microsoft Entra tenant that uses Microsoft Entra ID P2 licenses and an Azure subscription named Sub1. A security engineer named Admin1 holds an eligible Global Administrator assignm
- Your company has a Microsoft Entra tenant that contains 12 Azure subscriptions. A compliance investigation requires you to establish which administrator account elevated its access to the root scope (
- Your company has a Microsoft Entra tenant that contains 25 Azure subscriptions. Project teams created most of the subscriptions, and no administrator currently has access to all of them. A third-party
- Your company has a Microsoft Entra tenant that contains 30 Azure subscriptions and a Microsoft Sentinel workspace named Workspace1. During an incident review, you discover that a Global Administrator
- You are the security engineer for a Microsoft Entra tenant that contains 40 Azure subscriptions organized in several management groups. During a quarterly privileged access review, you must produce a
- Azure Backup roles separate backup operations from broad resource ownership
Use Azure Backup built-in roles and narrow vault scopes to grant only the backup management operations each operator needs. Subscription Owner is unnecessary for routine backup or restore duties and expands the impact of compromised credentials.
Trap Assign Owner on the subscription to every backup operator so all vault actions succeed.
6 questions test this
- You have an Azure subscription that contains a Backup vault named Vault2, which protects the managed disks of several virtual machines, and an empty resource group named RG-Restore that serves as the
- Your company has an Azure subscription named Sub1 that contains three Recovery Services vaults named VaultA, VaultB, and VaultC. Each vault protects the workloads of a different application team, and
- You have an Azure subscription that contains a Recovery Services vault named Vault1. A senior engineer named Admin1 must create new backup policies for Vault1, change the retention settings of existin
- Your company has an Azure subscription named Sub1 that contains a Recovery Services vault named Vault1, which protects 40 Azure virtual machines. A new operations team must be able to trigger on-deman
- You have an Azure subscription that contains a Recovery Services vault named Vault1, which protects 60 production virtual machines. The backup administrators hold the Backup Contributor role on Vault1
- You have an Azure subscription that contains a Backup vault named Vault3 and a storage account named storage1 that hosts blob containers of regulated data. An engineer named Eng1 holds the Backup Oper
- Multi-user authorization protects critical backup operations with Resource Guard
Enable multi-user authorization on a Recovery Services vault or Backup vault so protected operations also require applicable authorization on a separate Resource Guard. A backup administrator who lacks sufficient permissions on that guard cannot perform those critical actions despite vault permissions.
Trap Use a CanNotDelete lock on the backup vault as a substitute for independent approval of security-setting changes.
5 questions test this
- You have a Recovery Services vault named Vault1 that is protected by multi-user authorization through a Resource Guard named Guard1 in a separate Microsoft Entra tenant. A backup administrator must st
- Your company has an Azure subscription that contains a Recovery Services vault named Vault1 in the East US region. A security administrator created a Resource Guard named Guard1 in the West Europe reg
- Your company uses two Microsoft Entra tenants: a production tenant that contains a Recovery Services vault named Vault1, and a security tenant in which a security administrator created a Resource Guar
- You have an Azure subscription that contains a Recovery Services vault named Vault1, which protects 60 production virtual machines. The backup administrators hold the Backup Contributor role on Vault1
- Your company has a Resource Guard named Guard1 that provides multi-user authorization for six Backup vaults: five production vaults and a vault named Vault-Dev that a development team uses for short-l
- Always-on enhanced soft delete prevents attackers from disabling recovery retention
Use secure-by-default soft delete when deleted backup data must remain recoverable for the retention period even after an account compromise. All newly created vaults have soft delete permanently enabled, and it cannot be disabled in regions where secure-by-default assurance is in preview or general availability.
Trap Assume soft delete can still be disabled before deleting backup data in a secure-by-default region.
5 questions test this
- You have an Azure subscription that contains a Backup vault named Vault2 and a storage account named storage1 that stores regulated block blob data. Operational backup of blobs is configured for stora
- You have an Azure subscription named Sub1 that contains a Recovery Services vault named Vault1. An attacker who obtained the Backup Contributor role on Vault1 deleted the backup data of a protected vi
- Your company has an Azure subscription that contains a Recovery Services vault named Vault1. Vault1 protects files and folders on 15 on-premises servers that run the Microsoft Azure Recovery Services
- You have an Azure subscription named Sub1 that contains a Recovery Services vault named Vault1 in a resource group named RG-Legacy. Vault1 protects five virtual machines for a project that has ended,
- You have an Azure subscription that contains a Recovery Services vault named Vault1. A junior engineer selected Stop backup and then Delete backup data for a virtual machine named VM1, and the Backup
- Locked vault immutability prevents protected recovery points from being changed
Enable vault immutability to block operations that could shorten retention or delete protected backup data, and lock the setting when the protection must be irreversible. Pair immutable or always-on soft-delete protection with MUA for Azure Backup's maximum security posture.
Trap Rely on encryption at rest to prevent a privileged operator from deleting recovery points.
2 questions test this
- Your company has an Azure subscription that contains a Recovery Services vault named Vault1. Vault immutability is enabled and locked on Vault1. Three months ago, backups of a virtual machine named VM
- Your company has an Azure subscription that contains a Recovery Services vault named Vault1, and immutability is enabled and locked on Vault1. An application named App1 has been retired and its two vi
- Choose Azure Backup encryption keys according to required key control
Azure Backup encrypts backup data at rest with platform-managed keys by default and requires no enablement action for that baseline. Configure customer-managed keys stored in Azure Key Vault when the organization must control the encryption key for workloads backed up to a Recovery Services vault.
4 questions test this
- You have an Azure subscription that contains a Backup vault named Vault2 whose encryption settings use a customer-managed key stored in a key vault named KV1. During a cleanup of KV1, an administrator
- You have an Azure subscription that contains a newly created Recovery Services vault named Vault1 in the East US region and a key vault named KV1 in the same region. KV1 stores an enabled RSA key name
- You have an Azure subscription that contains a Backup vault named Vault2 and a key vault named KV1 that uses the Azure role-based access control permission model. KV1 stores an enabled RSA key, and so
- Your company has an Azure subscription that contains a key vault named KV1, which stores an enabled RSA key and has soft delete and purge protection turned on. A new internal standard requires that ba
- Use Azure Backup private endpoints only for supported protected workloads
Use a Recovery Services vault private endpoint when supported servers in a virtual network must back up and restore without exposing that virtual network to public IP addresses. Supported scenarios include SQL and SAP HANA databases in Azure VMs and on-premises servers using the MARS agent; do not assume every Azure Backup workload uses this private-endpoint path.
- Monitor Azure Backup operations for suspicious recovery activity
Configure Azure Backup's built-in monitoring and alerts for backup events, and use Backup Reports to audit backup and restore activity, track usage, and identify trends. These monitoring and reporting channels help surface unauthorized, suspicious, or malicious administrative and recovery activity.
- Policy as Code makes definitions and assignments reviewable and repeatable
Store custom policy and initiative definitions, assignments, parameters, and exemptions in source control and deploy them through a controlled pipeline. This approach provides change history and consistent promotion across environments instead of one-off portal edits.
Trap Export only a compliance report after manually recreating each policy assignment in production.
6 questions test this
- You have a management group named MG1 that contains a subscription named Sub-Dev, which exists only to validate governance changes. A pipeline deploys an updated version of a custom policy definition
- Your Azure Policy repository contains a policies folder with three new custom policy definitions and an initiatives folder with a new initiative that references all three by policyDefinitionReferenceI
- Your company keeps its Bicep templates in an Azure Repos Git repository that is connected to Microsoft Defender for Cloud through a DevOps security connector. The Microsoft Security DevOps extension a
- Your company deploys all Azure Policy definitions, initiatives, assignments, and exemptions to a management group named MG1 from an Azure Repos Git repository through an Azure Pipelines service connec
- Your governance repository holds the JSON for a custom initiative named Init1 and for its assignment at a management group named MG1, and Azure Pipelines deploys every change. A legacy resource group
- Your Azure Policy repository contains a custom definition that uses the deployIfNotExists effect and an assignment file that requests a system-assigned managed identity. An Azure Pipelines job deploys
- Policy changes should be validated at a limited scope before enforcement expands
Deploy a changed definition to a test assignment, use enforcement mode disabled where appropriate to evaluate impact, and inspect compliance results before promoting it to broad production scope. Versioned rollout avoids turning an untested deny rule into an organization-wide deployment outage.
Trap Assign a new custom deny definition directly at the tenant root management group.
9 questions test this
- You manage 60 Azure Arc-enabled servers in a subscription named Sub1. A Bicep deployment in your release pipeline assigns a custom machine configuration definition that uses the deployIfNotExists effe
- Your Azure tenant has a tenant root management group with two child management groups named MG-Corp and MG-Sandbox. MG-Sandbox contains only a subscription named Sub-Val that exists to trial governanc
- Your team stores Azure Policy definitions and assignments in a GitHub repository and deploys them with GitHub Actions. A trial assignment already evaluates a new definition in a subscription named Sub
- Your governance repository contains a custom policy definition that uses the deny effect. A trial assignment of it exists in a subscription named Sub-Val, which contains a storage account named stg1 t
- Your governance repository holds a custom policy definition that uses the deployIfNotExists effect to add a diagnostic setting to storage accounts, and a pipeline has assigned it to a resource group n
- Your company assigns a built-in Azure Policy initiative at a management group named MG-All from a Git repository through Azure Pipelines, and the assignment pins the definition version it evaluates. M
- Your company has an Azure subscription named Sub1 that contains an Azure Kubernetes Service cluster named cluster1 with the Azure Policy add-on installed. A GitHub Actions workflow deploys governance
- A built-in policy definition that uses the deployIfNotExists effect is assigned at a management group named MG-All to deploy a required diagnostic setting, and the assignment's managed identity alread
- Your company deploys every Azure Policy artifact from a GitHub repository, and write permissions to policy resources are held only by the workflow's deployment identity. A commit changed a custom defi
- IaC scanning finds security misconfigurations before resources reach production
Run Microsoft Security DevOps in GitHub Actions or Azure Pipelines with the IaC category to analyze supported ARM, Bicep, Terraform, Kubernetes, and related templates. Resolve the resulting infrastructure-as-code findings in the repository rather than waiting only for postdeployment assessment.
Trap Enable runtime threat alerts and omit template scanning because both controls inspect deployed resources.
7 questions test this
- Your company stores the Bicep and Terraform templates for its Azure landing zone in a GitHub Enterprise Cloud repository named Repo1. The GitHub organization is already connected to Microsoft Defender
- Your Azure DevOps pipeline runs the Microsoft Security DevOps task for the IaC category against a repository that contains ARM templates, Bicep files, Terraform configurations, and Kubernetes manifest
- Your company's GitHub Enterprise Cloud organization contains 40 repositories that store the ARM and Bicep templates for its Azure workloads. A workflow in each repository already runs the Microsoft Se
- Your company keeps the infrastructure as code templates for several projects in GitLab SaaS. A security engineer connected the GitLab group to Microsoft Defender for Cloud, and the Defender CSPM plan
- Your company has an Azure DevOps organization named Org1 that contains 300 repositories holding ARM, Bicep, and Terraform templates. Org1 is connected to Microsoft Defender for Cloud, and each reposit
- You have an Azure DevOps organization connected to Microsoft Defender for Cloud. The Defender CSPM plan is enabled, the Microsoft Security DevOps extension scans the ARM templates in every pipeline, a
- You have an Azure DevOps project named Project1 whose repository stores the Bicep templates that deploy a production subscription. The organization is connected to Microsoft Defender for Cloud, the Mi
- Security-relevant resource properties belong in the declarative deployment
Express controls such as managed identities, private access, diagnostic settings, purge protection, and role or policy assignments in the ARM, Bicep, or Terraform deployment so repeated environments converge on the intended posture. Keep plaintext secrets out of templates and parameter files; use secure parameters with Key Vault references or a credential-free deployment identity.
Trap Pass production passwords as plain-text Terraform variables so the same template can configure every environment.
6 questions test this
- Your team deploys a Bicep file from Azure Pipelines to a resource group named RG1. The file accepts a third-party API key as a string parameter, and the pipeline supplies the value at deployment time.
- A Bicep file deploys a key vault for each of your production workloads, and those vaults hold the keys that encrypt customer data. During a tabletop exercise you find that a highly privileged operator
- Your release pipeline deploys the same Bicep file to a production resource group every week to create and update a key vault named KV1. A private endpoint for KV1 already exists, and a security engine
- You have a Bicep file that deploys a function app and a key vault named KV1 to each of your environments. KV1 uses the Azure role-based access control permission model, and the function app has a user
- Your company has an Azure DevOps organization named Org1 that contains a project named Project1. A release pipeline in Project1 deploys Bicep files to a subscription named Sub1 through an Azure Resour
- Your platform team deploys Azure resources with Terraform from a pipeline. The administrator password for a database is committed to the repository as a plain-text value in a variables file so that th
References
- What are Azure management groups?
- Lock your resources to protect your infrastructure
- Azure Policy assignment structure
- https://learn.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure-basics
- Understand scope in Azure Policy
- Azure Policy exemption structure
- Understand how effects work in Azure Policy
- Remediate non-compliant resources with Azure Policy
- What is Azure role-based access control (Azure RBAC)?
- https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-steps
- Azure built-in roles
- Azure roles, Microsoft Entra roles, and classic subscription administrator roles
- Risk prioritization of security recommendations in Microsoft Defender for Cloud
- Azure custom roles
- Microsoft Entra custom roles overview
- Elevate access to manage all Azure subscriptions and management groups
- https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deployment-modes
- Use Azure role-based access control to manage Azure Backup recovery points
- Multi-user authorization using Resource Guard for Azure Backup
- Azure Backup secure by default: always-on soft delete
- Immutable vaults for Azure Backup
- https://learn.microsoft.com/en-us/azure/backup/encryption-at-rest-with-cmk
- https://learn.microsoft.com/en-us/azure/backup/private-endpoints-overview
- https://learn.microsoft.com/en-us/azure/backup/backup-azure-monitoring-built-in-monitor
- Regulatory compliance standards in Microsoft Defender for Cloud
- Security policies, standards, and the Microsoft Cloud Security Benchmark in Defender for Cloud
- Review security recommendations in Microsoft Defender for Cloud
- https://learn.microsoft.com/en-us/azure/defender-for-cloud/exempt-resource
- Improve regulatory compliance with the Defender for Cloud compliance dashboard
- Use Azure Key Vault to pass secure parameter values during ARM template deployment
- Design Azure Policy as Code workflows
- Overview of Microsoft Defender for Cloud DevOps security
- https://learn.microsoft.com/en-us/azure/defender-for-cloud/iac-vulnerabilities