Azure Landing Zone Hour 7: Operations, Brownfield Migration and Deep Troubleshooting
- Run a brownfield gap assessment on an Azure environment with years of history: use Azure Resource Graph to inventory management groups, subscriptions, policies, roles, networking and public exposure, then produce a gap list against the ALZ design areas.
- Following the CAF-recommended method of "duplicating the Landing Zone management groups and using audit mode", move existing subscriptions in batches into the ALZ hierarchy, and anticipate four risks: policy effect delay, DINE remediation volume, Deny blocking existing pipelines, and changes to RBAC inheritance.
- Move policy troubleshooting from "reading the error" to "following the pipeline": DINE existence condition → evaluation delay → managed identity permissions across scopes → template deployment. Handle multi-assignment conflicts, expired exemptions, and
DoNotEnforce/Enrollstaged rollouts. - Troubleshoot networking problems that hour 4 did not cover: asymmetric routing, missing links and duplicate zones in Private DNS zones, forwarding rules in the DNS Private Resolver, and source address changes caused by SNAT on Azure Firewall.
- Understand the Sovereign Landing Zone (SLZ): a variant of the ALZ with three levels of sovereignty controls (data residency, customer-managed key encryption, confidential computing), and its management groups and policy assignments in the ALZ library
platform/slz. - Design an operating model for large organizations: multi-tenant, multi-region, RACI for platform and workload teams, and change and escalation cadence. Then run the platform as a product: golden paths, self-service templates, documentation, and SLAs.
- Locate 10 mixed faults independently in the "combined fault box".
1-hour timetable
| # | Time | Module | Core content | Animation / interaction | Lab (sandbox tenant) |
|---|---|---|---|---|---|
| 0 | Before class | Setup: fault-injection environment and existing subscription samples | "Legacy" management groups and subscriptions, deliberately non-compliant resources, single-subscription fallback | Sample self-check list | Create mg-legacy and non-compliant resources |
| 1 | 00–06 | Brownfield environment alignment assessment | Gap dimensions, Resource Graph inventory, audit first, assessment report | Gap scanner | 6 Resource Graph inventory queries |
| 2 | 06–13 | Moving existing subscriptions into the ALZ hierarchy | Duplicate MG audit mode, migration waves, four risks, pre-exemptions | Migration timeline simulator | Move the legacy subscription into corp-brownfield |
| 3 | 13–21 | Policy troubleshooting: DINE failures, compliance delay and conflicts | DINE pipeline, cross-scope permissions, multi-assignment conflicts, expired exemptions, staged rollout | DINE pipeline debugger (core animation) | Create and fix one DINE failure |
| 4 | 21–28 | Deep networking and DNS troubleshooting | Asymmetric routing, duplicate private zones, Resolver forwarding, Firewall SNAT | Packet tracer | Reproduce a missing link on a Private DNS zone |
| 5 | 28–35 | Sovereign and regulated-industry landing zones | SLZ architecture, L1/L2/L3 controls, data residency, CMK, confidential computing | Sovereignty control evaluator | Try the data residency policy set in the sandbox |
| 6 | 35–42 | Large organizations: multi-tenant, multi-region and platform team operations | Multi-tenant, multi-region, operating model, RACI, escalation cadence | Incident dispatch drill | Write a RACI and an escalation ring |
| 7 | 42–50 | Platform as a product: golden paths and self-service | Golden paths, self-service templates, documentation, SLA / SLO, metrics | Ticket vs. self-service delivery time comparison | Write an Issue form for subscription requests |
| 8 | 50–60 | Combined fault box | 10 faults, in-browser simulator, troubleshooting tree | Fault box | Optional: inject 3 faults in the sandbox |
| — | After class | Cheat sheet · Capstone lab | Move one legacy subscription fully into corp and deliver an operations runbook | Final quiz (12 questions) | Capstone lab |
Knowledge coverage matrix
| Target skill | M1 | M2 | M3 | M4 | M5 | M6 | M7 | M8 | Key commands / resources | Lab |
|---|---|---|---|---|---|---|---|---|---|---|
| Resource Graph inventory and gap analysis | ✓ | ✓ | ✓ | ✓ | · | ✓ | · | ✓ | az graph query | Inventory queries |
| Subscription migration and audit first | ✓ | ✓ | ✓ | · | ✓ | ✓ | · | ✓ | az account management-group subscription add | Move into corp-brownfield |
| DINE / Modify troubleshooting | · | ✓ | ✓ | ✓ | · | · | · | ✓ | az policy remediation, activity log | Fix DINE |
| Multi-assignment conflicts, exemptions and staged rollout | ✓ | ✓ | ✓ | · | ✓ | ✓ | · | ✓ | az policy exemption, enforcementMode | Expired exemptions |
| Asymmetric routing and SNAT | · | · | · | ✓ | · | · | · | ✓ | show-next-hop, effective routes | Packet tracing |
| Private DNS and Resolver deep troubleshooting | ✓ | · | ✓ | ✓ | · | · | · | ✓ | az network private-dns, az dns-resolver | Missing link |
| Sovereign Landing Zone and confidential computing | · | · | · | · | ✓ | ✓ | · | · | Library platform/slz | Data residency policy set |
| Operating model, RACI, platform as a product | · | ✓ | · | · | · | ✓ | ✓ | ✓ | Issue forms, SLAs, DORA | RACI and forms |
What this hour leaves out (and where to learn it)
| Topic | Why it is not in this hour | Where to learn it |
|---|---|---|
| Basics of policy evaluation order, remediation task parameters and exemption structure | Covered in hour 2; this hour only goes one level deeper on troubleshooting | Hour 2 Module 4: effects · Module 5: remediation and exemptions |
| Non-transitive peering, UDR basics, common errors in Private Link auto-registration | Covered in hour 4 | Hour 4 Module 3 · Module 5 · Module 8 troubleshooting tree |
| PIM, federated credential errors (AADSTS700213 and similar) | Identity troubleshooting is in hour 3 | Hour 3 Module 8 |
| AMA / DCR, AMBA alerts, Defender plans | Covered in management and monitoring | Hour 5: Management and monitoring |
| Subscription vending module, EPAC, pipeline details | Covered in automation | Hour 6 Module 5: subscription vending · Module 6 EPAC |
| 50 production problems and interview questions | Covered in hour 8 | Hour 8 (optional) |
| Building internal developer platforms such as Backstage | Outside the ALZ scope | The "platform engineering" section of the DevOps / platform engineer skills list |
How to use this course material
Theory · diagrams · animation · commands · lab · production case · troubleshooting · quiz · voice · video. The troubleshooting slide in this hour covers only deeper problems that the earlier hours did not cover, and links at the top to the matching troubleshooting slides from earlier hours.
A quiz score of ≥ 70% or clicking "Mark this module complete" counts toward progress. Progress is saved in this browser's localStorage (it is cleared on refresh if local storage is disabled).
The "Voice" tab uses the browser's built-in Web Speech API (en-US) to read the narration script aloud. Without an English voice pack, the script can still be read or passed to a TTS tool.
platform/alz/2026.11.0 and platform/slz/2026.11.0. Management group IDs use the ALZ defaults (alz → platform / landingzones → corp / online …), consistent with hour 1. None of the Azure commands were run in a real tenant; the output is illustrative.Module 0 · Setup: fault-injection environment and existing subscription samples (complete before class)
- A dedicated sandbox Entra tenant with the default ALZ management group hierarchy (hour 1):
alz,platform,landingzones,corp,online,sandbox,decommissionedand so on, with the default 5 assignments oncorp(hour 4 Module 7). - One subscription that you can move freely, called the legacy subscription
sub-legacy-erpin this hour (it can besub-lz-corp-myappfrom hour 1; first move it out ofcorp). - Permissions: Owner on the tenant root management group (or on
alzand the newly createdmg-legacy); Owner on the legacy subscription. - Local machine: Azure CLI 2.76 or later (after MFA enforcement phase 2, older CLI versions may return MFA-related errors for write operations; see Hour 3 Module 5), the
resource-graphextension, and Bash or PowerShell 7.
Links to earlier hours
| From | Reused in this hour | What if you don't have it |
|---|---|---|
| Hour 1 | ALZ management group hierarchy and default assignments | Manually create alz, landingzones, corp, online, sandbox and decommissioned. On corp, assign only one Deny policy (for example the built-in "Secure transfer to storage accounts should be enabled", effect Deny) and one DINE policy; that is enough for most of the labs |
| Hour 2 | Remediation tasks, exemptions, Resource Graph extension | Run the command slides of Modules 1 and 3 from the beginning |
| Hour 4 | Hub vnet-hub-cc, Private DNS zone (rg-alz-dns-cc), Resolver dnspr-hub-cc, Firewall afw-hub-cc | The Module 4 labs use the in-browser packet tracer instead; only do the low-cost "missing link on a Private DNS zone" lab |
| Hours 5, 6 | Log Analytics workspace law-alz-mgmt-cc, subscription vending pipeline | The Module 3 DINE lab uses the built-in policy "Deploy diagnostic settings to a storage account" instead; Module 7 covers form design only |
Step 1: set shared variables
TENANT_ID=$(az account show --query tenantId -o tsv) SUB_LEGACY=<legacy-subscription-id> # legacy subscription sub-legacy-erp SUB_CONN=<connectivity-subscription-id> # connectivity subscription from hour 4 (optional) LOC=canadacentral LOC2=canadaeast RG_LEGACY=rg-legacy-erp-cc TAGS_BAD="" # deliberately no tags SUFFIX=$RANDOM ST_LEGACY=stlegacyerp$SUFFIX # storage account name: 3–24 lowercase letters and digits
Step 2: create a "legacy" management group and attach two old assignments
Many enterprises had their own management groups before ALZ, for example a department-based mg-legacy with policies from years ago. The two assignments below create a "multiple assignment conflict" in Module 3.
az account management-group create --name mg-legacy --display-name "Legacy (pre-ALZ)"
az account management-group subscription add --name mg-legacy --subscription $SUB_LEGACY
# Old assignment 1: allow only eastus and canadacentral (does not include canadaeast, the course's DR region)
az policy assignment create --name legacy-allowed-loc \
--scope /providers/Microsoft.Management/managementGroups/mg-legacy \
--policy e56962a6-4747-49cd-b67b-bf8b01975c4c \
--params '{"listOfAllowedLocations":{"value":["eastus","canadacentral"]}}'
# Old assignment 2: a Deny that requires a costcenter tag (lowercase, unlike the costCenter name the course uses)
az policy assignment create --name legacy-req-tag \
--scope /providers/Microsoft.Management/managementGroups/mg-legacy \
--policy 871b6d14-10aa-478d-b590-94f262ecfa99 \
--params '{"tagName":{"value":"costcenter"}}' \
--enforcement-mode DoNotEnforce
Built-in policy IDs come from the shared fact file: Allowed locations e56962a6-… (Indexed, default Deny), Require a tag on resources 871b6d14-… (Deny). The second one is deliberately set to DoNotEnforce to simulate a policy that someone once did not dare to turn on.
Step 3: create non-compliant resources in the legacy subscription
az account set -s $SUB_LEGACY az group create -n $RG_LEGACY -l $LOC # Storage account that allows HTTP (Deny-Storage-http in corp/landingzones will mark it non-compliant) az storage account create -g $RG_LEGACY -n $ST_LEGACY -l $LOC --sku Standard_LRS \ --https-only false --public-network-access Enabled --tags costcenter=erp # NSG that opens RDP to the internet (the target of Deny-MgmtPorts-Internet) az network nsg create -g $RG_LEGACY -n nsg-legacy-erp az network nsg rule create -g $RG_LEGACY --nsg-name nsg-legacy-erp -n allow-rdp-any \ --priority 100 --access Allow --protocol Tcp --direction Inbound \ --source-address-prefixes Internet --destination-port-ranges 3389 # Address space that overlaps with the course spoke, and a subnet with no NSG az network vnet create -g $RG_LEGACY -n vnet-legacy-erp --address-prefixes 10.1.0.0/16 \ --subnet-name snet-erp --subnet-prefixes 10.1.1.0/24 # One public IP (Deny-Public-IP-On-NIC in corp only governs NIC association; this is just an "exposure" sample) az network public-ip create -g $RG_LEGACY -n pip-legacy-erp --sku Standard
{
"name": "stlegacyerp21877",
"enableHttpsTrafficOnly": false,
"publicNetworkAccess": "Enabled",
"provisioningState": "Succeeded",
"tags": { "costcenter": "erp" }
}
mg-legacy, and Module 2 then moves it into corp-brownfield and corp. If platform resources (hub, DNS zones) are also in this subscription, then after the move into corp, policies such as Deny-HybridNetworking only affect new write operations; existing resources are not deleted. This is exactly the behavior Module 2 asks you to observe. All Module 4 networking labs can be done in a single subscription; only the cross-subscription permission problems cannot be reproduced.Sample environment overview
| Object | Deliberate problem | Where it is found / fixed |
|---|---|---|
mg-legacy | Not under alz; two old assignments | Module 1 inventory, Module 2 migration, Module 3 conflicts |
stlegacyerp… | Allows HTTP, public access, non-standard tag name | Module 1 finds it, non-compliant after the Module 2 migration, fixed in Module 3 |
nsg-legacy-erp | Internet → 3389 allowed | Module 2: after the move into corp, modifying this rule is rejected |
vnet-legacy-erp | 10.1.0.0/16 overlaps with the myapp spoke; subnet has no NSG | Module 1 finds it, Module 4 discusses renumbering |
pip-legacy-erp | Unused public IP | Module 1 exposure inventory |
Cost budget
| Resource | Billing method | Estimate |
|---|---|---|
| Management groups, policies, exemptions, Resource Graph | Free | 0 |
| Storage account (empty), Standard public IP | Per capacity / per hour | About $0.1–0.2 per day |
| Module 4 optional: Firewall Basic, test VM | Per hour | About $1 (1–2 hours) |
Self-check list
az account management-group show --name mg-legacy --expand -o jsonc --query "{parent:details.parent.name,children:children[].displayName}"
az policy assignment list --scope /providers/Microsoft.Management/managementGroups/mg-legacy \
--query "[].{name:name,mode:enforcementMode}" -o table
{
"children": [ "sub-legacy-erp" ],
"parent": "<tenant-id>"
}
Name Mode
------------------ ------------
legacy-allowed-loc Default
legacy-req-tag DoNotEnforce
Module 1 · Brownfield environment alignment assessment
- Distinguish greenfield from brownfield, and name the three alignment scenarios that CAF lists: a single subscription with no management groups, an existing multi-level management group hierarchy, and an enterprise organized by region.
- List the 6 gap dimensions across the ALZ design areas, and write one Resource Graph inventory query for each dimension.
- Use "audit first" (target policies assigned with
DoNotEnforce) to get data showing "what would be denied if enforcement were turned on now", rather than estimating from gut feeling. - Turn the assessment results into an actionable gap report: severity, owner, and migration wave.
What: what brownfield alignment is
Greenfield means deploying ALZ directly into an empty tenant. Brownfield means the tenant already has subscriptions, management groups, policies, networking and running workloads, which need to be aligned to the ALZ conceptual architecture. The CAF gives three typical scenarios in its "Transition existing Azure environments" document:
| CAF scenario | Starting characteristics | Biggest challenge |
|---|---|---|
| Single subscription with no management groups | One subscription holds everything (development, production and shared services mixed together) | Subscriptions must be split: moving resources changes the resource ID, and some resource types cannot be moved |
| Multiple management groups | An existing custom hierarchy (by department, environment or region), with years of accumulated policies | The "most restrictive wins" effect when old assignments stack with ALZ assignments; the assignable scope of old custom roles |
| Regional organization | Parallel hierarchies and networks built per region (such as North America and Europe) | ALZ does not recommend creating management groups by region. Express regional differences with policy parameters and network design instead |
Alignment does not mean "tear it down and start again". The CAF-recommended approach (detailed in Module 2) is: deploy the ALZ hierarchy in parallel with the existing environment in the same tenant, move existing subscriptions in batches, and use audit-mode assignments during the transition to observe the impact. When a subscription moves between management groups its resource ID does not change, and the workload itself is not affected. The real risks come from the policies and RBAC it inherits after the move.
Why: why assessment must come first
- Policy impact cannot be estimated by gut feeling: ALZ has 53 assignments on
landingzonesand 5 oncorp(hour 1). Only data can answer how many non-compliant resources appear once a subscription moves in, and which pipelines' next deployments will be denied. - Networking is often the hardest part to change: overlapping addresses, self-built VPN gateways, and public IPs in spokes are locked by corp policies, and fixing them requires a maintenance window.
- Permissions can "unexpectedly expand or shrink": after a subscription moves to a new management group, roles granted by the original parent disappear and roles from the new parent are inherited (hour 3 Module 2).
- Audit and budget: the assessment report is the basis for requesting a migration window and staffing from management.
How: 6 gap dimensions
| Dimension (corresponding design area) | Question to answer | Data source |
|---|---|---|
| Resource organization | Which management groups exist? Where are subscriptions attached? Are any subscriptions directly under the tenant root? | resourcecontainers |
| Governance | At what scope and effect are the existing policy assignments? Are any DoNotEnforce? Do they duplicate or conflict with the ALZ default assignments? | policyresources |
| Identity and access (IAM) | How many standing Owners are on the subscriptions? Are there roles assigned directly to users rather than groups? Where is the assignable scope of custom roles? | authorizationresources |
| Network topology | Do address spaces overlap? Does each subscription have its own VPN gateway? Where are the public IPs? | resources (VNets, gateways, public IPs) |
| Security | Are management ports open to the internet? Does storage allow HTTP or public access? | resources (NSGs, storage) + audit-mode compliance data |
| Management | Where do diagnostic settings send data? Are there several scattered Log Analytics workspaces? | resources (workspaces) + the method from hour 5 |
Audit first
The most valuable assessment data comes from "pretending it is already turned on": assign the target policies (for example the ALZ landingzones and corp policy sets) with enforcementMode = DoNotEnforce to the scope where the legacy subscription sits. Once compliance evaluation finishes (a new assignment starts evaluating about 5 minutes after it takes effect, and about 30 minutes at subscription level, see Hour 2), the compliance page will list "which resources would be non-compliant if enforced". Under DoNotEnforce, Deny does not reject requests and DINE / Modify does not auto-deploy, but compliance state is still calculated.
When: when to do it
- Do the first round before deploying ALZ (it decides the hierarchy and networking approach). Do a targeted assessment before each batch of subscription migration (it decides the exemptions and the remediation list).
- Do not wait for a "perfect" assessment before starting. The gap report is a living document that is updated with every migration wave.
- "Moving a subscription into corp will make Deny policies delete non-compliant old resources." No. After the move, existing resources are only marked non-compliant. But the next update request for those resources will be denied by Deny (Module 2).
- "Resource Graph can see everything in the tenant." It can only see subscriptions the caller has read access to. The assessment account needs Reader on the root management group (or must activate it through PIM).
- "Assessment just means running Azure Advisor." Advisor focuses on best practices for individual resources and cannot answer structural questions about hierarchy, inheritance and address planning.
- "Move all subscriptions into ALZ first, then fix things slowly." A one-time move makes every team hit Deny and DINE remediation at the same time, and support load gets out of control.
Current state and target: where the gaps are
Assessment process: four steps
Interaction: brownfield gap scanner
Simulate a legacy tenant with 6 subscriptions and 2 old management groups. Run the 6 inventory queries in turn. The scanner accumulates the findings on the card for each matching design area (the darker the color, the bigger the gap), then generates the gap report. The data is teaching sample data; the query statements match real Resource Graph table names.
6 inventory queries (Azure Resource Graph)
Run under an account with Reader on the root management group. Use --management-groups to limit the scope, and when there are more than 1,000 rows, use --skip-token to page (Hour 2 Module 7).
# ① Where subscriptions sit: list subscriptions not under alz az graph query --first 1000 -q " resourcecontainers | where type =~ 'microsoft.resources/subscriptions' | extend chain = tostring(properties.managementGroupAncestorsChain) | where chain !contains '\"name\":\"alz\"' | project subscription=name, subscriptionId, chain" -o table
Subscription SubscriptionId Chain
--------------- ------------------------------------ ------------------------------------------------------------
sub-legacy-erp <legacy-subscription-id> [{"displayName":"Legacy (pre-ALZ)","name":"mg-legacy"},{"name":"<tenant-id>"...}]
sub-dev-misc <dev-subscription-id> [{"displayName":"Tenant Root Group","name":"<tenant-id>"}]
# ② Existing policy assignments: scope, enforcement mode, referenced definition
az graph query --first 1000 -q "
policyresources
| where type =~ 'microsoft.authorization/policyassignments'
| extend scope=tostring(properties.scope), mode=tostring(properties.enforcementMode),
def=tostring(properties.policyDefinitionId)
| where scope !contains '/managementGroups/alz' and scope !contains '/managementGroups/landingzones'
| project name, scope, mode, def" -o table
# ③ Standing Owners at subscription and resource group level (Owner role ID 8e3af657-…), counted by principal type
az graph query -q "
authorizationresources
| where type =~ 'microsoft.authorization/roleassignments'
| extend role=tostring(properties.roleDefinitionId), ptype=tostring(properties.principalType),
scope=tostring(properties.scope)
| where role endswith '8e3af657-a8ff-443c-a75c-2fe8c4bcb635'
| summarize owners=count() by scope, ptype
| order by owners desc" -o table
# ④ Address space: find identical prefixes (partial overlaps need exporting and a script to judge)
az graph query -q "
resources
| where type =~ 'microsoft.network/virtualnetworks'
| mv-expand prefix = properties.addressSpace.addressPrefixes
| summarize vnets=make_list(strcat(subscriptionId,'/',name)), n=count() by prefix=tostring(prefix)
| where n > 1" -o jsonc
# ④b Gateways self-built in each subscription (in ALZ, hybrid connectivity should be centralized in connectivity)
az graph query -q "
resources
| where type in~ ('microsoft.network/virtualnetworkgateways','microsoft.network/vpngateways','microsoft.network/expressroutecircuits')
| project name, type, subscriptionId, resourceGroup, sku=tostring(properties.sku.name)" -o table
# ⑤ Public exposure: NSG rules that open management ports to the internet
az graph query -q "
resources
| where type =~ 'microsoft.network/networksecuritygroups'
| mv-expand r = properties.securityRules
| where r.properties.direction =~ 'Inbound' and r.properties.access =~ 'Allow'
| where tostring(r.properties.sourceAddressPrefix) in~ ('*','Internet','0.0.0.0/0')
| where tostring(r.properties.destinationPortRange) in ('22','3389','*')
| project nsg=name, rule=tostring(r.name), port=tostring(r.properties.destinationPortRange), subscriptionId" -o table
# ⑤b Storage accounts that allow HTTP or public access
az graph query -q "
resources
| where type =~ 'microsoft.storage/storageaccounts'
| where properties.supportsHttpsTrafficOnly == false or tostring(properties.publicNetworkAccess) != 'Disabled'
| project name, resourceGroup, https=properties.supportsHttpsTrafficOnly, pna=properties.publicNetworkAccess" -o table
# ⑥ Audit-mode "if enforced" result: count non-compliant resources per policy (referenced ID)
az graph query -q "
policyresources
| where type =~ 'microsoft.policyinsights/policystates'
| where tostring(properties.policyAssignmentName) startswith 'bf-'
| where tostring(properties.complianceState) =~ 'NonCompliant'
| summarize resources=dcount(tostring(properties.resourceId))
by assignment=tostring(properties.policyAssignmentName), ref=tostring(properties.policyDefinitionReferenceId)
| order by resources desc" -o table
Assignment Ref Resources -------------- ------------------------------------ ----------- bf-lz-storage deny-storage-http 14 bf-lz-mgmt deny-mgmtports-internet 9 bf-corp-pip deny-public-ip-on-nic 6 bf-lz-nsg deny-subnet-without-nsg 5
Lab 1: produce a gap report for the legacy subscription (about 20 minutes, free)
az graph query -q "resourcecontainers | where type =~ 'microsoft.resources/subscriptions' | count". If the count is lower than the number of subscriptions you see in the portal, the account lacks Reader on the root management group.gap-*.json (add -o json).mg-legacy in audit mode (names start with bf-, to make filtering for query ⑥ easy):
MG_LEGACY=/providers/Microsoft.Management/managementGroups/mg-legacy
az policy assignment create --name bf-storage-https --scope $MG_LEGACY \
--policy 404c3081-a854-4457-ae30-26a93ef643f9 --params '{"effect":{"value":"Deny"}}' \
--enforcement-mode DoNotEnforce
az policy assignment create --name bf-pip-on-nic --scope $MG_LEGACY \
--policy 83a86a26-fd1f-447c-b59d-e51f44264114 --enforcement-mode DoNotEnforce
az account set -s $SUB_LEGACY && az policy state trigger-scan --no-waitDoNotEnforce, the effect is written as Deny, but it will not reject any request.bf- assignments can be deleted after the Module 2 migration; the sample resources are kept.Case 1: a manufacturing company with 140 subscriptions, where assessment found 31 attached directly under the tenant root
Problem: over the years, departments created subscriptions freely using credit cards and EA department accounts, and new subscriptions defaulted to the tenant root management group (Hour 1). What was done: query ① listed the "orphan" subscriptions, and owners were identified from cost center tags and billing information. First, the hierarchy's default management group was changed to sandbox (with "require authorization" turned on) to stop new subscriptions from piling up; then the existing ones were handled. Lesson: stop the bleeding first (default management group), then treat the disease (migration). Otherwise the assessment will never keep up with new additions.
Case 2: audit-mode data changed the migration order
Problem: the architect originally planned to migrate the "most important" core system subscriptions first. Audit-mode results showed that the core systems had more than 400 non-compliant resources (many storage accounts allowing HTTP, subnets without NSGs), while 12 small internal app subscriptions were almost entirely compliant. What was done: the order was changed to migrate the subscriptions with a high compliance rate first, building up operational experience and the exemption process, and then handle the core systems. Lesson: order migrations by "risk and readiness", not by "business importance".
Case 3: the assessment missed a custom role
Problem: deleting the old management group failed after migration. Root cause: the AssignableScopes of an old custom role contained only mg-legacy, and an assignment still referenced it (hour 3: a custom role can have only one management group as its assignable scope). What was done: an item was added to the assessment checklist: authorizationresources | where type =~ 'microsoft.authorization/roledefinitions'. Before migration, the role's assignable scope was changed to alz.
Deeper problems (for introductory errors, see Hour 1 Module 8 and Hour 2 Module 8)
Resource Graph shows fewer subscriptions than the portal, and results differ slightly each time
Root cause: two separate causes are often mixed together. ① The caller has read access on only some subscriptions, and Resource Graph returns only visible subscriptions; PIM-eligible roles that are not activated are also invisible. ② If --management-groups or --subscriptions is not specified, the CLI uses the subscriptions visible in the current context, and tenants with more than 1,000 subscriptions are also truncated (hour 2). Diagnosis: az graph query -q "resourcecontainers | where type =~ 'microsoft.resources/subscriptions' | count" --management-groups <tenant-id>, and compare with az account list --all --query "length(@)". Fix: activate Reader on the root management group for the assessment account, and specify the root management group scope explicitly in queries.
Query ⑤ missed rules that open ports using a port range (such as 3000-4000) or a multi-prefix form
Root cause: NSG rules have single-value fields (destinationPortRange, sourceAddressPrefix) and array fields (destinationPortRanges, sourceAddressPrefixes), and the two forms are mutually exclusive. Querying only the single-value fields misses the array form, and port ranges need to be split and compared. Fix: run mv-expand once more on the array fields, export the range forms, and use a script to decide whether they cover 22 / 3389. More reliable still is to look at the audit-mode result of the ALZ policy Deny-MgmtPorts-Internet (query ⑥), because the policy definition already handles these forms.
The audit-mode assignment was created an hour ago, but the compliance page still shows 0/0
Root cause: 0/0 means no resource has been judged "applicable". Common causes: the assignment scope is wrong (assigned to mg-legacy after the subscription was moved away), the definition's mode is Indexed while the target is a resource group, or the resource type is not in the definition's if condition. This differs from "compliance delay", which shows Not started. Diagnosis: az policy state summarize --policy-assignment bf-storage-https, and check the subscription's current parent. Fix: correct the scope, then run az policy state trigger-scan.
Query ④ shows no overlap, but peering still reports an address overlap
Root cause: query ④ only finds identical prefixes. 10.1.0.0/16 and 10.1.4.0/22 partially overlap and are not listed. In addition, the address range of a deleted VNet may still remain in the remote side's "peered address space" sync state. Fix: export all prefixes and compare every pair with Python ipaddress.ip_network(a).overlaps(b), or use the "allocated / unmanaged address" view of an AVNM IPAM pool (Hour 4 Module 2).
Cannot delete the old management group: (Conflict) … has role definitions … / still referenced
Root cause: a custom role's AssignableScopes points to this management group, or policy definitions on this management group are still referenced by assignments at other scopes. Diagnosis: az role definition list --custom-role-only true --scope /providers/Microsoft.Management/managementGroups/mg-legacy, and az policy definition list --management-group mg-legacy. Fix: first change the role's assignable scope to alz (keep the same role ID to avoid recreating assignments), move the referenced policy definitions to alz and reassign them, then delete the management group.
1. Use one Resource Graph query to count the subscriptions directly contained in each management group.
az graph query -q " resourcecontainers | where type =~ 'microsoft.resources/subscriptions' | extend parent = tostring(properties.managementGroupAncestorsChain[0].name) | summarize subs=count() by parent | order by subs desc" -o table
2. List all assignments in the tenant whose enforcementMode is DoNotEnforce, with their scopes.
az graph query -q " policyresources | where type =~ 'microsoft.authorization/policyassignments' | where tostring(properties.enforcementMode) =~ 'DoNotEnforce' | project name, scope=tostring(properties.scope)" -o table
An insurance company has a three-level self-built management group hierarchy (group → subsidiary → dev/test/prod). Each prod management group has self-written "allowed locations" and "required tags" policies assigned, and each subsidiary's subscriptions have their own VPN gateways. How would you assess it and make recommendations?
① Inventory: use queries ①–④ to list the hierarchy, the old assignments, each subscription's gateways and address spaces. ② Structural gaps: splitting management groups by environment (dev/test/prod) does not follow ALZ guidance. Environment differences should be expressed through subscriptions and policy parameters, and self-built VPN gateways in each subscription should be consolidated into the hub in connectivity. ③ Policy gaps: when the old "allowed locations" stacks with the ALZ region policy, the most restrictive effect applies. After migration, delete the old assignments or unify the parameters to avoid an unexpected tightening where both sides must allow it. Tag policies must use the tag names agreed in the course (case-sensitive). ④ Audit mode: on corp-brownfield, copy the ALZ assignments with DoNotEnforce, get the non-compliant data, then triage. ⑤ Network migration (removing the self-built gateways) is the longest path. Schedule it separately, usually in the last wave.
Verified teaching videos
Official documentation
- CAF: Transition an existing Azure environment to the Azure landing zone reference architecture
- Azure Resource Graph table and resource type reference
- Policy assignment structure (enforcementMode)
Video storyboard (about 90 seconds)
This course material cannot generate video or MP3 directly. A storyboard and narration script are provided, which can be passed to a video tool.
Visual: a messy management group tree, with a few subscriptions sitting alone under the tenant root and red warning icons flashing.
Narration: most ALZ projects start from an environment that has already run for years. The first step is not deployment, but seeing the current state clearly.
Visual: six Resource Graph queries run one after another in a terminal, and the six cards on the right change color one by one.
Narration: hierarchy, policy, permissions, networking, exposure and management. One query for each of the six dimensions.
Visual: an assignment's toggle is stuck on DoNotEnforce, and the compliance page shows "14 non-compliant storage accounts".
Narration: audit mode tells you "what would be denied if enforced now" without interrupting any workload.
Visual: the gap report table is sorted by wave, and wave one is the small subscriptions with the highest compliance rate.
Narration: migration order is set by risk and readiness, not by business importance.
Module 2 · Moving existing subscriptions into the ALZ hierarchy
- Design a migration path using the four steps of CAF's "Transition an environment by duplicating a landing zone management group (Recommended)".
- Explain what happens to existing resources under Deny, DINE, Modify and Audit once their subscription moves into a new management group, and why new writes are immediately constrained.
- Anticipate and mitigate four risks: policy effect delay, DINE remediation volume, Deny breaking existing deployments, and RBAC inheritance changes.
- Control the blast radius with migration waves, pre-exemptions (
assignmentScopeValidation) and change windows.
What: the migration path recommended by CAF
- Deploy ALZ in parallel: deploy the ALZ hierarchy (Hours 1 and 6) in the same Entra tenant, coexisting with the existing environment without touching any existing subscription.
- Duplicate the Landing Zone management groups: under
landingzones, createcorp-brownfieldandonline-brownfield, copy all assignments ofcorp/online, and setenforcementModetoDoNotEnforce. CAF notes that this only copies the hierarchy and assignments, with no additional cost. - Move into the audit zone: move the legacy subscription into the brownfield management group. It immediately inherits the assignments on
alzandlandingzonesthat are enforced, plus the audit-mode assignments on the brownfield management group. Workload teams remediate based on the compliance report (optional: rebuild the workloads in a new subscription). - Move to the formal management group: once compliance reaches the agreed state, move it to
corp/online. Subscriptions that are finally retired go intodecommissioned.
alz (root) and landingzones remain enforced, for example landingzones' Deny-Subnet-Without-Nsg and Deny-Storage-http (hour 1). If audit data shows these upper-level policies would also disrupt workloads, you need to pre-exempt them before the move, or use staged rollout methods during migration such as resourceSelectors / Enroll on the relevant assignments (Module 3).What happens to existing resources after the move (CAF transition document)
| Effect | Existing resources | New create / update requests |
|---|---|---|
| Deny | Marked non-compliant, not rejected or deleted, keeps running | Denied immediately. Any PUT / PATCH on an existing resource counts as an update, for example a pipeline redeploying the same NSG |
| DeployIfNotExists | Marked non-compliant, not automatically remediated; a remediation task must be created manually | Automatically deployed after the evaluation delay (default 10 minutes) following successful resource creation or update |
| Modify / Append | Marked non-compliant, needs manual handling (Modify can use remediation tasks) | Rewritten directly at request time |
| Audit / AuditIfNotExists | Marked non-compliant | Logged only |
Why: the four risks
| Risk | Mechanism | Mitigation |
|---|---|---|
| ① Policy effect and visibility delay | After a subscription moves into a management group, subscription-level evaluation results appear about 30 minutes later. ARM's cache of the hierarchy can last up to 30 minutes, and the cached token for inherited RBAC also lasts up to 30 minutes. | Keep a change window of at least 1 hour for observation; use az policy state trigger-scan to speed it up; sign in again after migration |
| ② DINE remediation volume | Every DINE assignment makes existing resources non-compliant, requiring remediation tasks. A single task defaults to 500 resources and allows at most 50,000, with 10 parallel deployments by default | Remediate per assignment and start small (--resource-group). Estimate the write volume and cost on the target resources (Log Analytics workspace, Private DNS zone) |
| ③ Deny breaking existing deployments | An IaC "full PUT" rewrites the entire resource. Non-compliant properties in existing resources will cause the next deployment to be denied, even if this change is unrelated to the non-compliance | Run a pipeline dry run before migrating; fix the IaC code before moving the subscription; if necessary, use a temporary exemption (with expiresOn) |
| ④ RBAC inheritance changes | Roles granted by the old parent (including PIM eligibility) disappear, and roles from the new parent are inherited. The subscription's own direct assignments do not change | Before migration, export the "inherited" assignments with Resource Graph. Pre-grant the necessary roles at the new hierarchy. Lighthouse delegations are on the subscription or resource group and are not affected |
How: migration waves
- Wave 0 (platform): move the existing hub, DNS and shared service subscriptions into
connectivity/management/identity. These management groups have few assignments (hour 1: connectivity 1, management 0). - Wave 1: non-production subscriptions with the best audit data and cooperative teams. The goal is to refine the process (tickets, exemption approval, remediation tasks).
- Wave 2: production subscriptions with a high compliance rate, brownfield first, then the formal management group.
- Wave 3: subscriptions that need network restructuring (overlapping addresses, self-built gateways), with a separately scheduled maintenance window.
- Wrap-up: move retired subscriptions into
decommissioned(Enforce-ALZ-Decomm denies creating new resources and shuts down VMs; Hour 1), and delete empty old management groups.
Pre-exemption: assignmentScopeValidation (preview)
Exemptions usually must be created within the assignment's scope. assignmentScopeValidation: DoNotValidate allows creating an exemption for an assignment on the target management group while the subscription is still under the old management group. The official documentation gives exactly this use case: the subscription is to be moved to a new management group, but its resource properties would be blocked by the policies on the target. The exemption creator needs policyExemptions/write, and exempt/Action on the target assignment (hour 2).
When: when not to move
- When resources in the subscription are being refactored at large scale by IaC (Deny would interfere with the refactoring).
- When no business owner has been found for the subscription: after the move, who will handle the non-compliance?
- When the subscription needs to switch to a different Entra tenant: that is a "transfer subscription", which permanently deletes all role assignments (hour 3), and is usually worse than rebuilding in the target tenant.
- "The brownfield management group is audit mode, so nothing will be rejected after a subscription moves in." The assignments on the upper
alzandlandingzonesremain enforced. - "Moving a subscription changes resource IDs, so monitoring alerts will break." That happens when resources move between resource groups or subscriptions. Moving a subscription between management groups does not change the resource ID.
- "DINE will automatically fill in configuration for existing resources after the move." No, it must be remediated manually.
- "Moving it back to the original management group will undo all effects." Content that DINE or Modify has already deployed or rewritten is not rolled back.
Timeline for the 24 hours after the move
Why a "description-only change" is also denied
Migration timeline simulator
Choose a subscription profile, a target management group and preparation actions, then play through the sequence of events after the move. The numbers are a teaching model (based on the delays and limits in the official documentation), to show how "preparation actions" affect the blast radius.
1. Create the brownfield management group and copy corp's assignments (audit mode)
MG_CORP=/providers/Microsoft.Management/managementGroups/corp
az account management-group create --name corp-brownfield --display-name "Corp (brownfield)" --parent landingzones
MG_BF=/providers/Microsoft.Management/managementGroups/corp-brownfield
# Copy the assignments one by one: same definition, same parameters, DoNotEnforce. Names are at most 24 characters at management group scope
for a in $(az policy assignment list --scope $MG_CORP --query "[].name" -o tsv); do
def=$(az policy assignment show -n "$a" --scope $MG_CORP --query policyDefinitionId -o tsv)
par=$(az policy assignment show -n "$a" --scope $MG_CORP --query parameters -o json)
name="bf-${a:0:21}"
az policy assignment create --name "$name" --scope $MG_BF --policy "$def" \
--params "$par" --enforcement-mode DoNotEnforce \
--mi-system-assigned --location canadacentral -o none && echo "copied $a -> $name"
done
copied Audit-PeDnsZones -> bf-Audit-PeDnsZones copied Deny-HybridNetworking -> bf-Deny-HybridNetworking copied Deny-Public-Endpoints -> bf-Deny-Public-Endpoints copied Deny-Public-IP-On-NIC -> bf-Deny-Public-IP-On-NIC copied Deploy-Private-DNS-Zones -> bf-Deploy-Private-DNS-Zo
For policy set (initiative) assignments, --policy-set-definition is clearer. When --policy accepts a full definition resource ID, the CLI handles it according to the ID type; if it errors, use --policy-set-definition "$def" instead. DINE / Modify assignments need a managed identity even when they are DoNotEnforce. ALZ default assignment parameters (such as the private DNS zone subscription ID) are copied along with the parameters. In production, it is better to declare the brownfield management group directly in IaC (policy_assignments_to_modify in avm-ptn-alz, Hour 6) rather than copying with a script.
2. Before migration: export the inherited roles that will be lost
az role assignment list --scope /subscriptions/$SUB_LEGACY --include-inherited \
--query "[?starts_with(scope,'/providers/Microsoft.Management/managementGroups/mg-legacy')].{who:principalName,role:roleDefinitionName,scope:scope}" -o table
3. Pre-exempt the assignment on the target management group (preview feature, REST)
EXP_ID=/subscriptions/$SUB_LEGACY/providers/Microsoft.Authorization/policyExemptions/pre-move-mgmtports
az rest --method put --url "https://management.azure.com${EXP_ID}?api-version=2024-12-01-preview" --body '{
"properties": {
"policyAssignmentId": "/providers/Microsoft.Management/managementGroups/landingzones/providers/Microsoft.Authorization/policyAssignments/Deny-MgmtPorts-Internet",
"exemptionCategory": "Waiver",
"expiresOn": "2026-12-18T00:00:00Z",
"assignmentScopeValidation": "DoNotValidate",
"displayName": "ERP migration RDP rule remediation window",
"metadata": { "ticketRef": "CHG-1042", "owner": "erp-team" }
}
}'
assignmentScopeValidation appears in preview APIs such as 2024-12-01-preview (checked against azure-rest-api-specs on 2026-11-18). Check the official docs to confirm whether the stable API supports it. The exemption creator needs Microsoft.Authorization/policyAssignments/exempt/action on the assignment.
4. Move the subscription and observe
az account management-group subscription add --name corp-brownfield --subscription $SUB_LEGACY
az account set -s $SUB_LEGACY
az policy assignment list --disable-scope-strict-match \
--query "[].{name:name,mode:enforcementMode,scope:scope}" -o table # all assignments the subscription inherits
az policy state trigger-scan --no-wait
az policy state summarize --query "results.{nonCompliantResources:nonCompliantResources,nonCompliantPolicies:nonCompliantPolicies}"
Name Mode Scope
------------------------- ------------ -------------------------------------------------------------
Deny-Classic-Resources Default /providers/Microsoft.Management/managementGroups/alz
Deny-MgmtPorts-Internet Default /providers/Microsoft.Management/managementGroups/landingzones
Deny-Storage-http Default /providers/Microsoft.Management/managementGroups/landingzones
bf-Deny-Public-IP-On-NIC DoNotEnforce /providers/Microsoft.Management/managementGroups/corp-brownfield
...
{ "nonCompliantPolicies": 9, "nonCompliantResources": 41 }
5. Verify that updates to existing resources are rejected
az network nsg rule update -g $RG_LEGACY --nsg-name nsg-legacy-erp -n allow-rdp-any --description "touch"
(RequestDisallowedByPolicy) Resource 'allow-rdp-any' was disallowed by policy. Reasons: 'Management port access from the Internet must be blocked.'. See error details for policy resource IDs. Code: RequestDisallowedByPolicy
If the previous step created a pre-approved exemption that is now in effect, this command will succeed. That is the window the exemption gives you for remediation.
Lab 2: Migrate a legacy subscription in two steps (about 40 minutes, free)
Deny-Public-IP-On-NIC and Deploy-Private-DNS-Zones.alz and landingzones are Default (enforced).az resource tag --ids <nsg-id> --tags owner=erp -i, and check whether it succeeds (a tag-only request evaluates only the policies with tag conditions).allow-rdp-any rule (deleting is not create or update, and Deny does not block deletes), and enable HTTPS on the storage account: az storage account update -n $ST_LEGACY --https-only true. After trigger-scan, confirm that the non-compliant count has dropped.az account management-group subscription add --name corp --subscription $SUB_LEGACY. Use query ⑥ from module 1 (replace the filter with the corp assignment names) to confirm that every remaining issue has an exemption or a plan.mg-legacy and the bf-* audit assignments. You can keep the brownfield management group for the next batch of subscriptions.Case 1: All overnight releases failed after the move
Problem: On Friday afternoon, 8 subscriptions were moved straight into corp. That night, every Terraform release failed with RequestDisallowedByPolicy. Root cause: each team's NSG module has a rule that allows port 22 from the office egress IP, but the module falls back to source_address_prefix = "*". Existing resources kept running, so nobody noticed until a full PUT. Fix: the fix was not to undo the subscription move. Instead, add a 7-day exemption to Deny-MgmtPorts-Internet and fix the IaC module at the same time. Lesson: before migrating, run terraform plan and a pipeline dry run on each subscription.
Case 2: A remediation task tripled the Log Analytics bill
Problem: After the move, a full remediation of Deploy-Diag-LogsCat (the allLogs diagnostic setting) was run at the root of alz in one go. Thousands of resources began sending all their logs to the central workspace. Fix: remediate in batches by resource type. First estimate the log volume (Hour 5, Module 1), then use a DCR transformation or a separate table plan for high-volume types. Lesson: DINE remediation is a cost issue as well as a compliance issue.
Case 3: On-call engineers lost access after the migration
Problem: The PIM-eligible Contributor role for the on-call group, assigned on the old management group, disappeared with the move. During a midnight incident, no one could make changes. Fix: add three steps to the migration checklist: export inherited roles, re-grant them at the new level, and verify activation. Design a unified on-call role at the landingzones level (Hour 3, Module 4).
Deeper issues (for the basic errors, see Hour 1, Module 8: move permissions, and the portal still showing the old parent)
(RequestDisallowedByPolicy) A pipeline update to a property that "was not changed this time" is rejected
Root cause: Deny evaluates the full request body. Non-compliant properties on existing resources are submitted again with the full PUT. ARM templates and Bicep send a full-resource PUT by default. Most Terraform azurerm resources also send the full object. Diagnosis: find policyAssignmentName and policyDefinitionReferenceId in the additionalInfo of the error, and run az monitor activity-log list --resource-id <id> --status Failed --offset 1h. Fix: change the IaC to remove the non-compliant property. If that is not possible in the short term, create a precise exemption with expiresOn and policyDefinitionReferenceId, instead of setting the whole assignment to DoNotEnforce.
Within 30 minutes after the move, the same person sometimes can perform an operation and sometimes gets AuthorizationFailed
Root cause: several issued access tokens and several ARM regional instances cache the hierarchy inconsistently. Changes to inherited roles can take up to about 30 minutes to reach the token. Fix: run az account clear && az login to get a new token. Do not rely on a session that "worked a moment ago" during a change window. If it still fails after 30 minutes, check whether the new hierarchy actually grants the role: az role assignment list --scope /subscriptions/<id> --include-inherited --assignee <upn>.
InvalidCreatePolicyExemptionRequest: the exemption scope is outside the assignment scope
Root cause: while the subscription was still under the old management group, an exemption was created for an assignment on the target management group. By default, the scope is validated. Fix: use assignmentScopeValidation: "DoNotValidate" (preview API, see the command page). Check the exact error text in your environment. Note: exemptions like this only take effect after the move, so always add expiresOn and a ticket-number metadata field. Otherwise the exemption becomes a permanent backdoor.
After the move to the brownfield management group, Deny-Subnet-Without-Nsg still rejected the new subnet
Root cause: the assignment is on landingzones (see hour 1). The brownfield management group copied only the corp assignments, so the upper-level assignment is still enforced. Fix: this is expected behavior. Either create the NSG before the subnet (Hour 4), or grant a temporary exemption for this subscription. If you want full audit-only behavior for brownfield, exclude corp-brownfield from the landingzones assignments with notScopes, then copy those assignments onto brownfield in audit mode. The exclusion stays in place, so remove it after the migration ends.
After the move into corp, existing VNets were automatically linked to a DDoS plan or had their properties rewritten
Root cause: Enable-DDoS-VNET on landingzones has a Modify effect. It does not rewrite existing VNets immediately. However, any VNet update (for example, adding a subnet) rewrites them in the request. If the assignment parameter is still a placeholder plan ID, the update fails (Hour 4, Module 6). Fix: before migrating, confirm that the parameters of Modify assignments are real values or that the assignments are disabled. If needed, use a remediation task to handle them in a controlled way, rather than waiting for them to take effect during an unrelated change.
1. List the policy assignments the subscription inherits from all parents, and show the enforcement mode.
az account set -s <subscription-id>
az policy assignment list --disable-scope-strict-match --query "[].{name:name,mode:enforcementMode,scope:scope}" -o table2. Create a remediation task for only one resource group and one DINE assignment, and set the failure threshold to 10%.
az policy remediation create --name rem-erp-diag --resource-group rg-legacy-erp-cc \ --policy-assignment /providers/Microsoft.Management/managementGroups/alz/providers/Microsoft.Authorization/policyAssignments/Deploy-Diag-LogsCat \ --definition-reference-id <reference-id> --resource-discovery-mode ReEvaluateCompliance \ --failure-percentage 0.1 --parallel-deployments 5
The business asks you to move all 60 subscriptions into ALZ this week. How do you respond, and what is an executable plan?
First, state the risks. A one-time move makes every team hit Deny at the same time (the next deployment fails), DINE remediation (cost and write volume), and RBAC inheritance changes (access loss). Subscription-level evaluation takes about 30 minutes to show up, so problems will surface all at once. Plan: this week, move all 60 subscriptions into the brownfield management group in audit mode. This is low risk and meets the business need to be in the ALZ hierarchy. At the same time, analyze the audit data for the upper-level enforced assignments. Pre-exempt the subscriptions that upper-level Deny rules would break, with expiry dates. After that, move subscriptions into the main corp or online groups in 3–4 waves based on compliance rate, and review after each wave. Remediate DINE by assignment and resource group in batches, and estimate the logging cost in advance.
Verified training videos
Official documentation
- CAF: Transition an environment by duplicating a landing zone management group
- CAF: Transition existing environments (Policies section)
- Policy exemption structure: Assignment scope validation (preview)
- Manage management groups: Moving subscriptions
Video storyboard script (about 90 seconds)
This lesson cannot generate a video or MP3 directly. Storyboards and narration scripts are provided so you can pass them to a video tool.
Scene: a subscription icon is dragged from the old management group into corp. The resources below it keep running, shown in green.
Narration: Moving a subscription does not delete any resources or change resource IDs.
Scene: the timeline reaches 30 minutes, and a "non-compliant" label appears on each resource.
Narration: After about half an hour, compliance results appear. Existing resources are marked non-compliant, but they keep running.
Scene: a nightly pipeline sends a PUT, and a red shield blocks it.
Narration: The real surprise comes in the next deployment. Deny evaluates the entire request, so non-compliant properties on existing resources make that deployment fail.
Scene: the subscription first moves into the yellow corp-brownfield group, then into the green corp group.
Narration: That is why CAF recommends starting with a duplicated management group in audit mode, and moving into the main management group only after remediation.
Module 3 · Policy troubleshooting: DINE failures, compliance delays and conflicts
- Break DeployIfNotExists into seven stages (trigger → evaluation delay → existence condition → managed identity → target scope authorization → template deployment → re-evaluation), and write a diagnostic command for each stage.
- Handle problems that appear only at scale: cross-subscription authorization, orphaned role assignments after a managed identity is recreated, target resource locks, and DINE deployments blocked by another Deny.
- Identify multi-assignment conflicts: same-named diagnostic settings overwriting each other, two "Allowed locations" assignments taking the intersection, Modify conflicts, and old and new ALZ assignments running side by side.
- Manage the exemption lifecycle and staged rollouts: expiry warnings for exemptions,
DoNotEnforce→resourceSelectorsby region →Default, and the newEnrollmode.
What: the seven-stage DINE pipeline
| # | Stage | Mechanism (official docs) | Typical failure |
|---|---|---|---|
| 1 | Trigger | New resources: triggered after the resource provider returns success. Existing resources: only flagged during a compliance scan, and must be remediated manually with a remediation task | Assuming existing resources will be fixed automatically |
| 2 | Evaluation delay | evaluationDelay defaults to PT10M. It can be set to AfterProvisioning and similar values, or to 0–360 minutes | Checking right after creating the resource and concluding it did not take effect |
| 3 | Existence condition | Find related resources by type / name in existenceScope, then evaluate them with existenceCondition. The existence condition is evaluated using the caller's identity. | The condition is too strict (for example, it requires a specific name). After deployment, it still evaluates as "does not exist", and remediation loops forever |
| 4 | Managed identity | An assignment can have only one managed identity (system-assigned or user-assigned). A system-assigned identity is deleted along with the assignment | The assignment is deleted and recreated → new principalId, and the old role assignments become "Identity not found / Unknown" |
| 5 | Target scope authorization | The identity needs the roles listed in roleDefinitionIds in the definition, and they must be granted on the deployment target. The portal grants them automatically. With the CLI, SDK, or IaC, you must grant them manually. | The private DNS zone is in the connectivity subscription: authorization is granted only at the corp management group, so writing a zone group across subscriptions fails |
| 6 | Template deployment | Runs deployment as the identity (at subscription or resource group level). The deployment itself is also subject to all policies and locks | Parameters are placeholders; the target RG has a ReadOnly lock; the deployed resource is rejected by another Deny; the resource provider is not registered |
| 7 | Re-evaluation | The next evaluation after a successful deployment changes the state to Compliant | Two assignments deploy same-named settings that overwrite each other → compliance state flips back and forth |
Why: why the problems appear only at scale
- Cross-scope: ALZ's Deploy-Private-DNS-Zones is at
corpand writes zones inrg-alz-dns-ccin the connectivity subscription (Hour 4). Deploy-Diag-LogsCat is atalzand writes to the workspace in the management subscription. The IaC Accelerator adds extra authorization for these assignments. Hand-written or self-built IaC can easily miss it. - Identity lifecycle: when IaC recreates an assignment (for example, renaming it or changing its scope), the old system-assigned identity is deleted. Role assignments do not move with it.
- Assignment overlap: legacy management groups, old caf-enterprise-scale deployments, Defender for Cloud auto-assignments, and new ALZ assignments can all deploy the same thing to the same resource.
How: four forms of multi-assignment conflict
| Form | Symptom | Cause | Handling |
|---|---|---|---|
| Stacked Deny | A region is "allowed" in both assignments, but is still denied in practice | Multiple assignments are cumulatively the strictest: the two Allowed locations lists take the intersection | Delete the old assignment, or unify the parameters |
| DINE same-name overwrite | The target workspace of the diagnostic setting switches back and forth every day, so the compliance state flips | Two assignments deploy same-named diagnostic settings to different workspaces, and the later one overwrites the earlier one | Keep only one, or use different names (note that each resource can have at most 5 diagnostic settings, and logs are billed twice) |
| DINE duplication | Log volume doubles, and costs rise | Two assignments each deploy a copy under different names | Use Resource Graph to find multiple diagnostic settings on the same resource, then delete the duplicate assignment |
| Modify conflict | The request is rejected with a Modify conflict message | Two Modify assignments write different values to the same property; conflictEffect defaults to deny | Unify the values, or adjust conflictEffect (hour 2) |
How: exemption lifecycle
After expiresOn passes, the exemption object is kept but no longer takes effect (official: kept for records). At the moment of expiry the resource is not changed, but its next update is subject to Deny again. This is the "time bomb": expiry often falls on a holiday or an unattended night, when a pipeline triggers it. Governance practice: every exemption must have expiresOn, a ticket number, and an owner in its metadata. Each week, use Resource Graph to list exemptions expiring within 14 days and notify their owners. Delete expired exemption objects on a regular schedule.
How: staged rollout of a new Deny
- DoNotEnforce: compute compliance only, and collect the impact (audit first, as in module 1).
- resourceSelectors: on the assignment, filter by
resourceLocationso it applies to only one region (such ascanadaeast), or narrow it byresourceType. Each assignment can have up to 10 selectors. - overrides: within one policy set assignment, first override the effect of one definition to Audit.
- Enroll: a new value for
enforcementMode. It works with policy enrollments to enable in batches (hour 2 facts). - Default: full enforcement, with a fallback plan. Changing the override back to Audit is faster than deleting the assignment, and it keeps the compliance history.
When: where to check first
- "Not started / no data" → a timing issue: check the assignment creation time and the evaluation triggers (hour 2 timetable).
- "NonCompliant with no deployment record" → stages 1–3: existing resource? evaluation delay? existence condition?
- "Deployment record exists but Failed" → stages 4–6: check the deployment error codes (AuthorizationFailed / ScopeLocked / RequestDisallowedByPolicy / InvalidTemplate).
- "Compliance flips back and forth" → stage 7: look for another assignment.
- "Granting the assignment's identity access at the assignment scope is enough." It is not. Grant it on the target where DINE deploys. This is especially easy to miss across subscriptions.
- "DINE deployments bypass other policies." They do not. Deployments are subject to Deny and locks too.
- "When an exemption expires, its exemption object is deleted automatically." It is not. The object is kept, but it no longer takes effect.
- "With DoNotEnforce, DINE does nothing." It will not deploy automatically, but you can still start a remediation task manually (hour 2 facts).
DINE pipeline and the 7 failure points
The "flip" of same-named diagnostic settings
Core animation: DINE pipeline debugger
A new storage account is created in corp. ALZ's DINE should deploy diagnostic settings for it (or deploy a zone group for a private endpoint). Pick one injected failure, then watch where the request stops at each stage, what appears in the logs, and which command to use to locate it.
Stages 1–3: was it triggered, and why was it judged "does not exist"
# Compliance details for a resource under an assignment (includes complianceReasonCode and evaluation time)
az policy state list --resource <resource-id> \
--filter "policyAssignmentName eq 'Deploy-Diag-LogsCat'" \
--query "[].{state:complianceState,ref:policyDefinitionReferenceId,time:timestamp}" -o table
# evaluationDelay, existenceScope and roleDefinitionIds in the definition (for a policy set, first find the referenced definition)
az policy definition show --name <definition-name-or-guid> \
--query "policyRule.then.details.{delay:evaluationDelay,type:type,scope:existenceScope,roles:roleDefinitionIds}"
Stages 4–5: who the identity is, and whether it has a role on the target
MG_CORP=/providers/Microsoft.Management/managementGroups/corp
PID=$(az policy assignment show -n Deploy-Private-DNS-Zones --scope $MG_CORP --query identity.principalId -o tsv)
echo $PID
# All role assignments for this identity (including cross-subscription)
az role assignment list --assignee $PID --all --query "[].{role:roleDefinitionName,scope:scope}" -o table
# Grant: Network Contributor on the resource group that holds the DNS zones (connectivity subscription)
az role assignment create --assignee-object-id $PID --assignee-principal-type ServicePrincipal \
--role "Network Contributor" --scope /subscriptions/$SUB_CONN/resourceGroups/rg-alz-dns-cc
# Orphaned assignments: role assignments whose principal no longer exists (the portal shows Identity not found)
az role assignment list --scope /subscriptions/$SUB_CONN/resourceGroups/rg-alz-dns-cc \
--query "[?principalName==''].{id:id,principalId:principalId,role:roleDefinitionName}" -o table
Stage 6: the real error of a failed deployment
# Status and error of each deployment inside the remediation task
az policy remediation deployment list --name rem-dns-zones --management-group corp \
--query "[?status!='Succeeded'].{res:remediatedResourceId,status:status,err:error.code,msg:error.message}" -o table
# Activity log: DINE actions triggered by the policy, and deployment failures
az monitor activity-log list --resource-group <rg> --offset 2h --status Failed \
--query "[].{op:operationName.value,caller:caller,status:status.value,msg:properties.statusMessage}" -o jsonc
Res Status Err Msg --------------------------------------- ------- ---------------------- ----------------------------------------------- .../privateEndpoints/pep-stmyapp-blob Failed AuthorizationFailed The client '<principal-id>' ... does not have authorization to perform action 'Microsoft.Network/privateDnsZones/join/action' over scope '/subscriptions/<conn-sub>/resourceGroups/rg-alz-dns-cc/...' .../storageAccounts/stlegacyerp21877 Failed ScopeLocked The scope '...' cannot perform write operation because following scope(s) are locked
Conflicts and exemptions: Resource Graph
# Multiple diagnostic settings on the same resource (clues for duplicate or conflicting DINE) az graph query -q " resources | where type =~ 'microsoft.insights/diagnosticsettings' | extend target=tolower(tostring(split(id,'/providers/microsoft.insights/')[0])) | summarize settings=make_list(name), n=count() by target | where n > 1" -o jsonc # The same definition assigned at multiple scopes (old and new ALZ, legacy management groups side by side) az graph query -q " policyresources | where type =~ 'microsoft.authorization/policyassignments' | summarize scopes=make_list(tostring(properties.scope)), n=count() by def=tostring(properties.policyDefinitionId) | where n > 1" -o jsonc # Exemptions expiring within 14 days az graph query -q " policyresources | where type =~ 'microsoft.authorization/policyexemptions' | extend exp=todatetime(properties.expiresOn) | where isnotnull(exp) and exp < now(14d) | project name, exp, assignment=tostring(properties.policyAssignmentId), owner=tostring(properties.metadata.owner) | order by exp asc" -o table
Staged rollout: enforce in one region only
az policy assignment update --name Deny-Storage-http --scope /providers/Microsoft.Management/managementGroups/landingzones \
--resource-selectors '[{"name":"canary-canadaeast","selectors":[{"kind":"resourceLocation","in":["canadaeast"]}]}]'
--resource-selectors requires a newer CLI. Check the parameter format with az policy assignment update -h. ALZ default assignments are managed by IaC, so change them in IaC in production, or the next deployment will overwrite them (Hour 6, Module 7).
Lab 3: Create and fix a cross-scope DINE failure (about 30 minutes, free or very low cost)
corp-brownfield, assign one DINE (recommended: the built-in policy that sends diagnostic settings for the storage account blob service to law-alz-mgmt-cc; if there is no workspace, use the "send to storage account" version instead). Create it with the CLI using only --mi-system-assigned, and grant no roles.stlegacyerp…. Expected result: the remediation task fails with the deployment error AuthorizationFailed. Use remediation deployment list (from the command page) to read the missing action and scope.roleDefinitionIds of the definition, grant the role in both the legacy subscription and the resource group that holds the workspace. Wait a few minutes for the role assignment to propagate, recreate the remediation task, and confirm that it succeeds.az lock create -n ro --lock-type ReadOnly -g $RG_LEGACY. After 15 minutes, check the activity log. The DINE deployment should fail with ScopeLocked. Delete the lock, create a remediation task for that account, and confirm that the diagnostic setting appears.mg-legacy (if the subscription has already moved, temporarily assign at the subscription level), assign another DINE that deploys a same-named diagnostic setting pointing to a different target. Run remediation twice in a row on the same resource, and use az monitor diagnostic-settings list --resource <id> to see the target get overwritten. Delete this assignment to finish the lab.nsg-legacy-erp with expiresOn set to 10 minutes from now. After it expires, run command 5 from module 2 again and confirm that it is rejected. Use the "expiring within 14 days" query to verify that the exemption object still exists.Case 1: A self-written Terraform deployment of ALZ left all private endpoints without DNS records
Problem: the team did not use the Accelerator. They deployed avm-ptn-alz themselves, and the Deploy-Private-DNS-Zones compliance rate was 0%. Root cause: the module grants the identity access only at the assignment scope (corp), but the zones are in the connectivity subscription. Fix: use the module's extra role-assignment scope parameter (or a separate azurerm_role_assignment) to grant the identity access on rg-alz-dns-cc. Create a remediation task for the existing endpoints. Lesson: for every DINE, answer "where does it write?", not just "where is it assigned?"
Case 2: An exemption expired on Lunar New Year's Eve
Problem: a 90-day exemption expired during a public holiday. That night, an automatic scale-out pipeline updated a VMSS, Deny rejected the update, and the service degraded. Fix: introduce a weekly exemption expiry report with a 14-day window. Exemption expiry dates must not fall in a change freeze period. Renewal requires re-approval and a remediation plan.
Case 3: A three-week staged rollout of one Deny
Problem: the security team wanted to enforce "no public network access for storage" on landingzones. Fix: week 1, DoNotEnforce to collect data (it found 230 non-compliant accounts). Week 2, use resourceSelectors to enforce only in canadaeast and work through the tickets. Week 3, enforce in all regions. Rollback plan: override the effect to Audit (do not delete the assignment, so the compliance history is kept). Result: only 4 tickets in total, all within the staged region.
Deeper issues (for the basic issues, see Hour 2, Module 8: remediation task missing a reference ID, Succeeded but still non-compliant, tasks Running for hours, and the basic cases of remediation AuthorizationFailed)
Remediation task Failed: … does not have authorization to perform action 'Microsoft.Network/privateDnsZones/join/action' over scope '…/rg-alz-dns-cc/…'
Root cause: authorization was granted only at the assignment scope, and the cross-subscription target has no role. Diagnosis: the scope in the error is where the permission is missing. Run az role assignment list --assignee <principalId> --all. Fix: grant the roles listed in roleDefinitionIds of the definition on the scope in the error (or its resource group). Wait for propagation, then remediate again. Prevention: declare an "additional authorization scope" for every DINE in IaC.
The role assignment list shows "Identity not found" or an empty principalName, and all DINE deployments suddenly fail
Root cause: the assignment was deleted and recreated (renamed, rescoped, or replaced by IaC). The system-assigned identity was deleted with it, and the new identity has no roles. The old role assignments are now orphaned. Diagnosis: compare the assignment's current identity.principalId with the principalId in the role assignments. Fix: grant the new identity access, and delete the orphaned assignments (there is a limit of 5,000 role assignments per subscription, hour 3). Prevention: for assignments that need cross-scope authorization, use a user-assigned managed identity, whose lifecycle is independent of the assignment.
Deployment failed: (ScopeLocked) The scope '…' cannot perform write operation because following scope(s) are locked
Root cause: the DINE target (such as the parent resource of a diagnostic setting, or the RG that holds the DNS zones) has a ReadOnly lock. Locks apply to all identities, including a policy's managed identity. Fix: for platform resources, use CanNotDelete locks instead of ReadOnly. Or use the deny settings of a deployment stack instead of locks, and add the policy identity to the exclusion list (Hour 6, Module 3).
Deployment failed: RequestDisallowedByPolicy — the resource deployed by DINE is rejected by another Deny
Root cause: DINE deployments are subject to all assignments, the same as regular requests. For example, a storage account or network resource deployed by DINE violates a Deny at the same scope (region, tag, or public access). Diagnosis: the error details of the failed remediation deployment list the assignment that rejected it. Fix: change the DINE parameters so the deployed content is compliant (for example, add a required tag). If necessary, grant an identity-based exemption for the assignment's managed identity (userPrincipalId in resourceSelectors, hour 2), and limit it to that definition's reference ID.
InvalidTemplate / LinkedInvalidPropertyId: parameter 'changeme' or an empty workspace ID
Root cause: placeholder parameters in the default values file of the ALZ library (such as dnsZoneRegion defaulting to changeme for the private DNS zones, or the Log Analytics workspace ID) were not replaced. The assignment itself can be created, but deployment fails. Diagnosis: az policy assignment show -n <name> --scope <mg> --query parameters. Fix: set real values in policy_default_values in IaC (Hour 6, Module 2), redeploy the assignment, and then remediate.
Compliance state flips between Compliant and NonCompliant every day
Root cause: two assignments deploy same-named objects (diagnostic settings, extensions, tags) with different content. Or a Modify effect and IaC keep rewriting the same property: IaC changes it back on each deployment, and the policy changes it again. Diagnosis: use the activity log to find the most recent writer for each resource (which managed identity or pipeline is the caller). Use the "same definition, multiple scopes" query from the command page. Fix: keep one assignment. In IaC, use ignore_changes, or change the property to match the policy.
A new assignment shows Compliant, but there are clearly non-compliant resources
Root cause: there are several possibilities: the definition's mode is Indexed but the resource type does not support tags or location; the resource is in notScopes; the assignment has resourceSelectors that cover only some regions; or an old exemption is still in effect (its state should be Exempt, not Compliant, so distinguish them in the compliance list). Diagnosis: az policy assignment show --query "{notScopes:notScopes,selectors:resourceSelectors,mode:enforcementMode}". Query the policy state per resource to check whether isCompliant matches complianceState.
1. Find the managed identity of a DINE assignment, and list its role assignments in all subscriptions.
PID=$(az policy assignment show -n Deploy-Diag-LogsCat --scope /providers/Microsoft.Management/managementGroups/alz --query identity.principalId -o tsv)
az role assignment list --assignee $PID --all --query "[].{role:roleDefinitionName,scope:scope}" -o table2. List the exemptions that expire within 30 days and have no owner metadata.
az graph query -q " policyresources | where type =~ 'microsoft.authorization/policyexemptions' | extend exp=todatetime(properties.expiresOn), owner=tostring(properties.metadata.owner) | where isnotnull(exp) and exp < now(30d) and isempty(owner) | project name, exp, id" -o table
Two weeks after the move into corp, the network team reports that half of the newly created private endpoints have DNS records and half do not. All the ones with records are in canadacentral, and all the ones without are in canadaeast. How would you investigate?
"Split by region" is the key clue. (1) Check the parameters of Deploy-Private-DNS-Zones. If dnsZoneRegion is set only to canadacentral, region-specific zones (for example, zones with a regional short name) will not match in canadaeast. (2) Check whether the assignment has resourceSelectors that select only one region, which may be a leftover from an earlier staged rollout. (3) Check whether the canadaeast endpoints' subscription or resource group sits under another scope (such as online) where this assignment does not exist. (4) Check the remediation error. If it is AuthorizationFailed, the canadaeast endpoints are in another subscription, and the identity has no permission there. After the fix, create remediation tasks for the existing endpoints by region, and remove the leftover staged-rollout selectors from IaC.
Verified training videos
Official documentation
- Troubleshoot common errors - Azure Policy
- deployIfNotExists effect
- Remediate non-compliant resources
- Policy exemption structure
Video storyboard script (about 90 seconds)
This lesson cannot generate a video or MP3 directly. Storyboards and narration scripts are provided so you can pass them to a video tool.
Scene: seven boxes form a pipeline, and a storage account icon enters from the left.
Narration: Every DeployIfNotExists is a seven-stage pipeline.
Scene: the icon stops and turns red at stage five, Authorization. A zoom-in shows the resource group in the connectivity subscription.
Narration: The most common failure at scale: the identity has permission only at the assignment scope, but it needs to write to another subscription.
Scene: two assignments point to the same diagnostic setting, and its target keeps switching back and forth.
Narration: When two assignments deploy same-named settings, the compliance state flips every day.
Scene: a countdown on an exemption card reaches zero, and the pipeline is immediately rejected.
Narration: An expired exemption does not change the resource, but the next update is rejected again. Remind the owner two weeks before expiry.
Module 4 · Network and DNS troubleshooting in depth
- Identify four kinds of asymmetric routing: a hybrid connection bypassing the firewall, dual firewalls across regions, private endpoint return traffic bypassing UDRs, and NVA active-standby failover. For each one, give a symmetric-routing fix.
- Troubleshoot the structural problems of private DNS: duplicate same-named private zones (left over from brownfield), a VNet that can link only one zone with a given name, and the
NxDomainRedirectfallback for cross-tenant private endpoints. - Troubleshoot forwarding rules in DNS Private Resolver: where the ruleset is linked, forwarding loops, and
168.63.129.16being unreachable from on-premises. - Understand Azure Firewall SNAT rules: network rules do not SNAT RFC 1918 or RFC 6598 destinations by default, application rules always SNAT, custom private ranges, and how they affect on-premises ACLs and logs.
10.0.0.0/16 (firewall 10.0.0.4, Resolver inbound 10.0.2.4), spoke 10.1.0.0/16, on-premises 192.168.0.0/16. Importance: ★★★★☆What: why asymmetric routing is fatal
Azure Firewall and most NVAs are stateful. They allow only return traffic that belongs to a known session. If the outbound path skips the firewall but the return path goes through it (or the reverse), the firewall sees a "SYN-ACK without a SYN" and drops it. Typical symptoms: the TCP handshake fails, or the connection drops a few dozen seconds after it is established. ICMP may still work, which can be misleading.
| Pattern | Outbound | Return | Symmetric fix |
|---|---|---|---|
| ① Hybrid connection bypasses the firewall | On-premises → gateway → directly to the spoke (the gateway learns the peered VNet prefixes) | Spoke UDR 0.0.0.0/0 → firewall | GatewaySubnet route table: spoke prefixes → firewall; or spokes do not send on-premises prefixes through the firewall (make both sides consistent) |
| ② Dual firewalls across regions | cc spoke → cc firewall → ce spoke | ce spoke → ce firewall → cc spoke | The AzureFirewallSubnet route tables of the two hubs point each region's prefixes at the other region's firewall, so both directions pass through both firewalls in order. Alternatively, only one region's firewall handles cross-region traffic. |
| ③ Private endpoint return traffic | spoke VM → firewall → private endpoint in another VNet | Private endpoint returns directly to the VM (return traffic from the endpoint does not follow the subnet UDR) | The firewall SNATs this traffic (application rules always SNAT; network rules need the private range set), so the return traffic comes back to the firewall |
| ④ NVA active-standby / multiple instances | Via the load balancer to instance A | Via another route to instance B | Internal load balancer HA ports with session affinity, or session sync within the NVA itself. Azure Firewall handles multiple instances inside the service |
What: structural problems in private DNS
- Duplicate zones with the same name: brownfield subscriptions often have a
privatelink.blob.core.windows.netzone created by an application team. Multiple zones with the same name can exist (in different resource groups), but a VNet can link only one zone with a given name. A legacy VNet linked to the old zone cannot then link to the central zone. ALZ's Deploy-Private-DNS-Zones writes records only to the central zone. The result: the same storage account resolves to different answers in different VNets, or returns NXDOMAIN. The Audit-PeDnsZones policy on corp only audits newly created privatelink zones (hour 4), and does not block anything. - NXDOMAIN and fallback: when the private zone linked to a VNet has no record for a storage account (for example, a storage account in another tenant), resolution returns NXDOMAIN, so the connection fails even if the other side allows public access. The VNet link property
resolutionPolicy = NxDomainRedirect("Enable fallback to internet" in the portal, API 2024-06-01 onward, applies only to Private Link zones) makes Azure's recursive resolver retry with the public name when it gets NXDOMAIN. - Resolver forwarding: the outbound endpoint and forwarding ruleset send
corp.contoso.localto on-premises DNS. On-premises conditional forwarding for Azure names must point to the Resolver inbound endpoint IP (168.63.129.16is reachable only from inside Azure). If on-premises DNS forwards "all unknown names" back to the Azure inbound endpoint, and the ruleset linked to the inbound endpoint's VNet sends them back on-premises, you get a forwarding loop, which shows up as SERVFAIL or timeouts.
What: Azure Firewall SNAT rules (official)
| Traffic | Default behavior | Impact |
|---|---|---|
Network rule, destination is RFC 1918 or RFC 6598 (100.64.0.0/10) | No SNAT | On-premises sees the real IP of the spoke VM |
| Network rule, destination is a public IP | SNAT to the firewall's public IP (with forced tunneling, SNAT to a private IP in AzureFirewallSubnet) | When enterprises use public ranges as internal ranges, traffic gets SNATed unexpectedly |
| Application rule (any destination) | Always SNAT (transparent proxy) | When accessing an on-premises HTTP service through an application rule, on-premises sees the firewall instance's private IP, so source-IP-based ACLs break |
You can change this in the firewall policy's Private IP ranges (SNAT). 0.0.0.0/0 means network rules never SNAT (in this case, you cannot reach the internet directly). 255.255.255.255/32 means always SNAT. A custom list must keep IANAPrivateRanges. A firewall attached to a firewall policy must be configured on the policy (the CLI's --private-ranges applies only to classic rules; for policies, use the portal or ARM / Bicep). You can also turn on auto-learn (it learns every 30 minutes, requires an associated Route Server, and is not supported in the CLI).
How: troubleshooting order
- Trace each direction separately: the effective routes of the source, the effective routes of the destination, and the route table at each hop in between (also check GatewaySubnet and AzureFirewallSubnet).
- Check the source IP in the firewall logs: in the structured logs
AZFWNetworkRule/AZFWApplicationRule, a deny for "no matching session" in the return direction indicates asymmetry. - DNS before connectivity: run
nslookupon the source VM to see which zone the answer comes from (private IP, public IP, or NXDOMAIN), then check which zones the VNet is linked to. - Check the source address: what source IP does the destination (the on-premises server or the PaaS firewall rule) see? Does it match the ACL?
When: must check during brownfield migration
- Before peering a legacy VNet to the hub: check for overlapping addresses (module 1) and check which privatelink zones it is linked to (this module).
- Before adding a UDR to a legacy spoke: check whether on-premises has ACLs based on the VM's source IP (after the firewall is added, the source may become the firewall IP).
- When the second region goes live: design symmetric routing across regions.
- "If ping works, the routing is fine." ICMP may be allowed by different rules, or the return path may go another way. Test with TCP instead.
- "If I add a UDR to the private endpoint subnet, return traffic will go through the firewall." Return traffic from a private endpoint does not follow the subnet UDR. You need SNAT or a network policy design.
- "The firewall does not SNAT traffic to 10.x." This is true only for network rules. Application rules always SNAT.
- "Just link the central zone to the legacy VNet again." A VNet can link only one zone with a given name, so you must first migrate the records and remove the old link.
Asymmetry in dual firewalls across regions, and the fix
Same-named private zones and SNAT rewriting
Packet tracer
Pick a failure scenario and step through the packet hop by hop, viewing the source and destination addresses, the matched route, and the firewall session table. After turning on "Apply fix", replay to compare the two paths. Addresses follow the hour 4 convention, and log formats are examples.
Routes in both directions
# Outbound: spoke VM to on-premises az network watcher show-next-hop -g rg-lz-myapp-cc --vm vm-myapp-test \ --source-ip 10.1.1.4 --dest-ip 192.168.20.10 -o table # Return-path entry points: which route tables are associated with GatewaySubnet and AzureFirewallSubnet az network vnet subnet show -g rg-alz-conn-cc --vnet-name vnet-hub-cc -n GatewaySubnet --query routeTable.id -o tsv az network vnet subnet show -g rg-alz-conn-cc --vnet-name vnet-hub-cc -n AzureFirewallSubnet --query routeTable.id -o tsv # Routes the gateway learned and advertised (on-premises prefixes, spoke prefixes) az network vnet-gateway list-learned-routes -g rg-alz-conn-cc -n vgw-hub-cc -o table az network vnet-gateway list-advertised-routes -g rg-alz-conn-cc -n vgw-hub-cc --peer <bgp-peer-ip> -o table
Firewall logs: look for "no session" denies and the source address after SNAT (Log Analytics, resource-specific table)
AZFWNetworkRule | where TimeGenerated > ago(1h) | where (SourceIp startswith "192.168." and DestinationIp startswith "10.1.") or (SourceIp startswith "10.1." and DestinationIp startswith "192.168.") | project TimeGenerated, SourceIp, SourcePort, DestinationIp, DestinationPort, Protocol, Action, Policy, RuleCollection, Rule | order by TimeGenerated desc AZFWApplicationRule | where TimeGenerated > ago(1h) and Fqdn has "intranet.contoso.local" | project TimeGenerated, SourceIp, Fqdn, TargetUrl, Action, Rule
SNAT settings of the firewall policy
az network firewall policy show -g rg-alz-conn-cc -n afwp-hub-cc --query snat # The CLI is available only for firewalls with classic rules: # az network firewall update -g rg-alz-conn-cc -n afw-hub-cc --private-ranges IANAPrivateRanges 20.40.0.0/16
// Firewall policy (Bicep / ARM): keep the IANA private ranges, and add the public range used internally by the enterprise
"properties": {
"snat": { "privateRanges": [ "IANAPrivateRanges", "20.40.0.0/16" ] }
}
Private DNS: duplicate zones and links
# Same-named privatelink zones in the tenant (left over from brownfield)
az graph query -q "
resources
| where type =~ 'microsoft.network/privatednszones' and name startswith 'privatelink.'
| summarize copies=count(), where_=make_list(strcat(subscriptionId,'/',resourceGroup)) by name
| where copies > 1" -o jsonc
# Which private zones a VNet is linked to
VNET_ID=$(az network vnet show -g rg-legacy-erp-cc -n vnet-legacy-erp --query id -o tsv)
az graph query -q "
resources
| where type =~ 'microsoft.network/privatednszones/virtualnetworklinks'
| where tolower(tostring(properties.virtualNetwork.id)) == tolower('$VNET_ID')
| project zone=tostring(split(id,'/')[8]), link=name, reg=properties.registrationEnabled, policy=properties.resolutionPolicy" -o table
# Cross-tenant private endpoint: turn on fallback on the VNet link (needs a newer CLI; check with -h)
az network private-dns link vnet update -g rg-alz-dns-cc -z privatelink.blob.core.windows.net \
-n link-hub --resolution-policy NxDomainRedirect
Resolver forwarding rules and loops
az dns-resolver forwarding-ruleset list -g rg-alz-conn-cc -o table
az dns-resolver forwarding-rule list -g rg-alz-conn-cc --ruleset-name frs-hub-cc \
--query "[].{name:name,domain:domainName,targets:targetDnsServers[].ipAddress,state:forwardingRuleState}" -o table
az dns-resolver vnet-link list -g rg-alz-conn-cc --ruleset-name frs-hub-cc -o table
# Observe on a VM: a loop usually shows up as SERVFAIL, and the time taken is close to the timeout
dig +tries=1 +time=5 erp.corp.contoso.local @10.0.2.4
Lab 4: Reproduce "same-named zone + missing link" and migrate to the central zone (about 25 minutes, almost free)
az network private-dns zone create -g $RG_LEGACY -n privatelink.blob.core.windows.net az network private-dns link vnet create -g $RG_LEGACY -z privatelink.blob.core.windows.net \ -n link-legacy --virtual-network vnet-legacy-erp --registration-enabled false
rg-alz-dns-cc, create a link on the central zone for vnet-legacy-erp (use the full VNet ID for the cross-subscription link). Record the error: the same VNet is already linked to a same-named zone (use the exact error text from your environment).az network private-dns record-set a list -g $RG_LEGACY -z privatelink.blob.core.windows.net -o table. Fill them in on the central zone, or rebuild the zone group for the matching private endpoint so that DINE writes them.link-legacy, then create a link on the central zone. Or, the better approach: after the legacy VNet is peered to the hub, set its DNS server to the Resolver inbound 10.0.2.4, and stop linking directly to any privatelink zone.nslookup on the storage account. You should get a private IP. Then delete the legacy zone.AZFWApplicationRule query from the command page to compare the source IP with the target's access log, and observe the SNAT. Delete the firewall when you are done.Case 1: After the second region went live, cross-region calls failed at random
Problem: after canadaeast went live, about 50% of cc's calls to ce's API failed. Root cause: hub-to-hub peering connects directly, and each spoke's UDR points to its own regional firewall, creating the asymmetry shown in Figure 4-1. The "50%" comes from the connections that happened to have a return session on the ce side. Fix: add routes on both AzureFirewallSubnets that send the peer region's prefixes to the peer firewall, and update the firewall rules on both firewalls to allow the traffic. Lesson: a multi-region design review must trace the return path.
Case 2: 37 privatelink zones from an acquisition
Problem: after the acquired company's subscriptions moved into corp, DINE wrote records for new private endpoints to the central zone. But the acquired company's VNets still linked to their own zones, so all the new services returned NXDOMAIN. Fix: generate an inventory with the duplicate-zone query → merge the records → change each VNet to point to the Resolver → delete the old zones. During the migration, turn on NxDomainRedirect for links that access resources in the other tenant.
Case 3: Local database refused connections after the firewall went live
Problem: after all spoke outbound traffic was routed through the firewall, the connection to a local SQL Server was refused by the on-premises firewall. Root cause: to write rules by FQDN, the team allowed the MSSQL protocol with an application rule. Application rules always SNAT, so on-premises saw the firewall's IP. Fix: use a network rule instead (the destination is RFC 1918, so no SNAT), and enable the firewall DNS proxy to support FQDNs in network rules (Standard / Premium; Basic does not support the DNS proxy, hour 4 facts).
Deeper issues (for the basic issues, see Hour 4, Module 8: next hop None, nslookup returning a public IP, zone group not created, Resolver subnet delegation)
TCP handshake fails but ping works; firewall logs show a Deny / no matching rule in the return direction
Root cause: asymmetric routing. The return traffic reached a firewall that has no session (or the outbound traffic skipped the firewall). Diagnosis: run show-next-hop on both ends, check the route tables on GatewaySubnet and AzureFirewallSubnet, and search the firewall logs for both directions using the 5-tuple. Fix: make routing symmetric using the tables described in the principles section. For cross-region traffic, both firewalls need allow rules.
Access to a private endpoint in another VNet through the firewall: intermittent timeouts or RST
Root cause: return traffic from the private endpoint does not go through the firewall that the source subnet's UDR points to. It returns directly to the source VM, so the firewall session is incomplete. Fix: make the firewall SNAT this traffic. Use an application rule (it always SNATs), or add the destination range that needs SNAT to the firewall policy's private ranges (for example, 255.255.255.255/32 means always SNAT; this has a large impact, so use it with care).
Cannot create a private zone link for the VNet: the VNet is already linked to a same-named zone (use the exact error text from your environment)
Root cause: a VNet cannot link two private DNS zones with the same name at once. A legacy brownfield zone is using the name. Diagnosis: the "zones linked to a VNet" query on the command page. Fix: migrate the records → delete the old link → link the central zone. Or resolve through the Resolver instead (recommended: spokes should not link directly to privatelink zones).
Accessing a storage account in a partner's tenant: NXDOMAIN (the account allows public access)
Root cause: the privatelink.blob.core.windows.net zone linked to the local VNet has no record for the other account, so the authoritative NXDOMAIN blocks the fallback to public resolution. Fix: set resolutionPolicy: NxDomainRedirect on the relevant VNet link ("Enable fallback to internet" in the portal). Or create a private endpoint for the other account in your own tenant. Note that this setting applies only to Private Link zones.
dig returns SERVFAIL, and the time taken is close to the timeout; outbound query volume in the Resolver metrics is abnormally high
Root cause: a forwarding loop. The Azure ruleset forwards the domain to on-premises DNS, and on-premises DNS forwards the same domain (or "everything") back to the Resolver inbound endpoint. Diagnosis: list the rules in the ruleset and the VNets they are linked to, and check the target of the on-premises conditional forwarder. Fix: each domain should have only one authoritative direction. On-premises conditional forwarding for Azure should cover only Azure public zone names (such as blob.core.windows.net) and Azure private zones. The ruleset should not forward Azure zones out.
On-premises server logs show the source IP as 10.0.0.x (the firewall subnet), and the ACL denies it
Root cause: the traffic hit an application rule (which always SNATs), or the destination address is not in the private range the firewall expects (for example, the enterprise uses public ranges as internal ones), so a network rule SNATs it. Diagnosis: check whether the log table is AZFWApplicationRule or AZFWNetworkRule, and run az network firewall policy show --query snat. Fix: use a network rule instead, or add that range to the policy's private ranges (keep IANAPrivateRanges), or change the ACL to the AzureFirewallSubnet range.
A network rule has an FQDN, but the rule never matches
Root cause: FQDNs in network rules need the firewall DNS proxy, and the client's DNS must point to the firewall so that the firewall and the client resolve to the same IP. The Basic SKU has no DNS proxy. Fix: on Standard or Premium, enable the DNS proxy and point spoke DNS to the firewall's private IP (the firewall then forwards to the Resolver inbound endpoint or 168.63.129.16). Or use an application rule instead (but note the SNAT).
1. Use Resource Graph to list all private zone links that have "fall back to internet" enabled.
az graph query -q " resources | where type =~ 'microsoft.network/privatednszones/virtualnetworklinks' | where tostring(properties.resolutionPolicy) == 'NxDomainRedirect' | project zone=tostring(split(id,'/')[8]), link=name, resourceGroup" -o table
2. Check which routes are in the route table associated with GatewaySubnet in the hub.
RT=$(az network vnet subnet show -g rg-alz-conn-cc --vnet-name vnet-hub-cc -n GatewaySubnet --query routeTable.id -o tsv)
az network route-table show --ids "$RT" --query "routes[].{name:name,prefix:addressPrefix,hop:nextHopType,ip:nextHopIpAddress}" -o tableAfter the legacy ERP is moved into corp and peered to hub: the ERP app cannot reach the on-premises Oracle (192.168.30.5:1521), and access to the Azure SQL private endpoint also fails, but both work from the jump box in hub. Give the troubleshooting steps and the likely root causes.
“Hub works, spoke fails” means the problem is in the spoke’s routing, DNS or source address. ① Routing: the ERP spoke has a UDR 0/0 → firewall, so the outbound path to on-premises goes through the firewall, but the gateway return path may go straight to the spoke (GatewaySubnet has no spoke → firewall route), which is asymmetric. Check both directions. ② Source address: if you allow port 1521 with an application rule, the firewall applies SNAT, and the on-premises Oracle ACL sees the firewall IP. Use a network rule instead. ③ DNS: the ERP VNet is still linked to the legacy privatelink.database.windows.net zone (note that this zone is not in ALZ’s Deploy-Private-DNS-Zones list, a fact from hour 4). The hub zone is either not linked or has no records. Point DNS to the Resolver inbound endpoint and maintain the records in the hub zone. ④ Address overlap: the ERP VNet was originally 10.1.0.0/16, which overlaps the myapp spoke. The peering may be to a different VNet that only appears to succeed, so first confirm the address space has been re-planned.
Verified instructional video
Official documentation
- Azure Firewall SNAT private IP address ranges
- Fallback to internet for Azure Private DNS zones
- Azure DNS Private Resolver overview
- CAF: Private Link and DNS integration at scale
Video storyboard script (about 90 seconds)
This courseware cannot generate a video or MP3 directly. The storyboard and narration script are provided so you can hand them to a video tool.
Visual: two firewalls. The blue outbound path goes through only the left one. The red return path hits the right one and is blocked.
Narration: A stateful firewall only allows sessions it has seen. If outbound and return traffic take different paths, the connection breaks.
Visual: two privatelink zones with the same name. A VNet can link to only one of them.
Narration: A VNet can link to only one private zone with a given name. The legacy zone holds the name, so the records in the hub zone are not visible.
Visual: a packet passes through the firewall’s application rule, and the source address changes from 10.1.1.4 to 10.0.0.x.
Narration: Application rules always apply SNAT, so the on-premises side sees the firewall’s address.
Visual: the four lines of the troubleshooting checklist are ticked in turn: routes in both directions, firewall logs, DNS answers, source address.
Narration: Deep troubleshooting comes down to these four steps.
Module 5 · Sovereign Landing Zones for regulated industries
- Explain how Sovereign Landing Zone (SLZ) relates to ALZ. It uses the same design principles and design areas, and differs only in resource organization (adds management groups) and in security, management and governance (adds policies).
- Explain the three levels of sovereign controls by data classification: L1 data residency, L2 encryption at rest and in transit (customer-managed keys), and L3 encryption in use (confidential computing). Also cover the policy assignments that each level maps to in SLZ.
- Understand data residency boundaries: the difference between regional services and non-regional (global) services, and the exceptions you must document.
- Know how SLZ is deployed: the ALZ Library
platform/slz, the IaC Accelerator (Terraform and Bicep overlay packages), and the archived status of the old repository. You can add SLZ incrementally on top of an existing ALZ.
What: what SLZ is
Microsoft documentation defines Sovereign Landing Zone as a variant of the ALZ platform landing zone architecture, for customers with sovereignty requirements. It keeps the ALZ design principles and 8 design areas. The differences are in only two places:
| Design area | SLZ difference |
|---|---|
| Azure billing and Entra tenant, identity and access, network topology and connectivity, platform automation and DevOps | No change |
| Resource organization | Adds Public, Confidential Corp and Confidential Online management groups under Landing Zones |
| Security, management and governance | Adds Azure Policy (audit or enforced), based on the organization’s sovereignty requirements |
The official implementation page stresses that SLZ is an architecture variant. It does not require replacing an existing ALZ implementation. You can layer sovereign design and policies onto an existing landing zone. Start from the existing landing zone unless there is a critical structural gap.
Three levels of sovereign controls (by data classification)
| Classification | Public | Internal | Confidential | Secret |
|---|---|---|---|---|
| L1 Data residency | Optional | Required | Required | Required |
| L2 Encryption at rest / in transit (CMK) | Optional | Optional | Required | Required |
| L3 Encryption in use (confidential computing) | Optional | Optional | Optional | Required |
- L1 Data residency: use “allowed locations” type policies to restrict deployment regions. Be aware that non-regional services (official examples: Azure Front Door, Traffic Manager, Azure Policy, Azure DNS) cannot be assigned a region, so their data may be replicated globally. Even regional services can have data characteristics that cross regions, depending on the service. Document any required exceptions in writing (for example, global networking or DNS services). EU customers also have the EU Data Boundary.
- L2 encryption: all services encrypt by default with platform-managed keys (PMK). Sovereign requirements call for customer-managed keys (CMK), stored in Key Vault (Standard / Premium) or Key Vault Managed HSM (recommended for higher requirements). Managed HSM’s External Key Management (EKM) can keep keys in an HSM that you operate, but it affects the SLA of dependent services. Transport layer: traffic between Azure datacenters is encrypted with MACsec by default. For on-premises connections, use TLS, VPN, or VPN / ExpressRoute MACsec on top of ExpressRoute (ExpressRoute is not encrypted by default).
- L3 encryption in use: Azure confidential computing (confidential VMs, confidential containers, Intel SGX enclaves) encrypts memory inside a hardware trusted execution environment (TEE). Combined with Azure Attestation and Secure Key Release (only a TEE that passes attestation can get keys from Key Vault Premium / Managed HSM). The official guidance is to treat L3 as a gradual process: first measure confidential computing readiness, then enforce Deny.
How: SLZ in the ALZ Library (platform/slz/2026.11.0)
| Management group (ID) | archetype | Additional assignments |
|---|---|---|
slz (display name Sovereign Landing Zone, intermediate root) | root + sovereign_l1_controls | Enforce-Sov-L1-Regions: data residency policy set, Deny. The allowed regions list defaults to empty and must be filled in |
security, management, connectivity, identity under platform | Each archetype + sovereign_l2_controls | Four L2 controls (see below) |
landingzones → public | public | Deny-L3-IP-Routing: denies mixed network resource types and cross-subscription VNet peering (reuses the Enforce-ALZ-Sandbox policy set) |
landingzones → corp, online | corp / online + sovereign_l2_controls | ALZ default + L2 |
landingzones → confidential_corp, confidential_online | corp / online + L2 + sovereign_l3_controls | ALZ default + L2 + Enforce-Sov-L3-Conf |
local, sandbox, decommissioned | Same as ALZ | — |
Four L2 assignments: Enforce-Sov-L2-TLS (TLS version for transport encryption; includes Deny / Modify / DINE / AINE), Enforce-Sov-L2-HTTPS (HTTPS only; includes Deny / Modify / AINE), Enforce-Sov-L2-CMKP (CMK in Key Vault Premium; Audit), Enforce-Sov-L2-CMKM (CMK in Managed HSM; Audit). L3 references the built-in policy set “[Preview]: Enforce Encryption-in-Use across Azure Services”. It includes the “allowed resource types” policy (206 items) and the “allowed VM sizes” policy (91 confidential computing SKUs). In the built-in definitions both default to Deny. Two TrustedLaunch audit policies are also included. The data residency policy set “[Preview]: Enforce Data Residency across Azure Services” contains 5 definitions (allowed locations, resource group allowed locations, and others). As of 2026-11, these policy sets are still labeled preview.
Deployment options
- Terraform: in the Terraform starter from the IaC Accelerator, choose the “Implement Sovereign Landing Zone (SLZ) controls” option. In essence, the
alzprovider referencesplatform/slz(which depends onplatform/alz2026.11.0), witharchitecture_name = "slz". - Bicep: before the Accelerator bootstraps, overlay the
.configandtemplatesfrom theexamples/slzfolder of theAzure/alz-bicep-acceleratorrepository into the config directory. (One place on the same official page says “Terraform only for now”, and another gives the Bicep steps. Follow the Accelerator documentation.) - Old repository
Azure/sovereign-landing-zone(based on classic Bicep): the README says it “will be archived in the first half of 2026” and points to the new documentation on learn.microsoft.com. Do not use it for new projects.
When: what regulated industries need on top
- Regulatory compliance policy sets: the built-in Regulatory Compliance policy sets in Azure Policy (for example NIST SP 800-53, ISO 27001, Canadian Federal PBMM, and others; check the portal for exact names and versions) and the Defender for Cloud compliance dashboard (Hour 5, Module 4). They measure controls, while sovereign policies enforce technical constraints. The two complement each other.
- Operational sovereignty: who can access the data (Customer Lockbox, PIM approval), who holds the keys (Managed HSM / EKM), and in which region logs are retained.
- “To be compliant, you must tear down ALZ and rebuild it as SLZ.” Microsoft states clearly that SLZ is a variant, and you can layer it onto an existing ALZ.
- “A data residency policy guarantees that no data leaves the region.” It restricts where resources can be deployed. Global services and some data characteristics of other services need separate assessment, and exceptions must be documented.
- “CMK means you can only use Managed HSM.” Key Vault Premium also works. Managed HSM gives exclusive control, but not every service supports it.
- “Confidential computing is the same as disk encryption.” Confidential computing protects data in memory while it is being processed.
SLZ management group hierarchy and control overlay
Secure Key Release: keys are released only to an attested TEE
Sovereign control evaluator
Select a target management group and a resource request. The evaluator checks L1 → L2 → L3 in order against the SLZ default assignments and returns Deny, Audit or pass, along with the name of the assignment that triggered it. The rules are based on the default assignments in library 2026.11.0 and the default effects of the built-in policy sets. This is a teaching simplification and does not represent the full logic of every built-in definition.
Terraform: using the SLZ library in avm-ptn-alz
provider "alz" {
library_references = [
{ path = "platform/slz", ref = "2026.11.0" } # depends on platform/alz 2026.11.0, pulled in automatically
]
}
module "slz" {
source = "Azure/avm-ptn-alz/azurerm"
version = "0.23.0"
architecture_name = "slz"
parent_resource_id = data.azapi_client_config.current.tenant_id
location = "canadacentral"
# Data residency: the allowed regions default to an empty list and must be filled in (see the module README for the parameter structure)
policy_assignments_to_modify = {
slz = {
policy_assignments = {
Enforce-Sov-L1-Regions = {
parameters = {
listOfAllowedLocations = jsonencode({ value = ["canadacentral", "canadaeast"] })
}
}
}
}
}
}
Versions and dependencies come from the shared fact file: avm-ptn-alz 0.23.0, alz provider 0.22.x. For the full provider block and identity setup, see Hour 6, Module 2. When layering onto an existing ALZ, a common approach is to add only the L1/L2/L3 assignments to the existing management groups (custom archetype), rather than redeploying the slz root.
View the built-in sovereign policy sets
for id in bebfcba2-e789-4da6-9043-726ef3a00d02 7a76da03-ec94-45ea-a4fd-496c350c2a63; do
az policy set-definition show --name $id \
--query "{name:displayName,version:version,policies:length(policyDefinitions),category:metadata.category}" -o jsonc
done
{ "category": "Sovereignty", "name": "[Preview]: Enforce Data Residency across Azure Services", "policies": 5, "version": "1.1.0-preview" }
{ "category": "Sovereignty", "name": "[Preview]: Enforce Encryption-in-Use across Azure Services", "policies": 4, "version": "1.0.0-preview" }
Try data residency in audit mode in the sandbox
az policy assignment create --name sov-l1-trial \
--scope /providers/Microsoft.Management/managementGroups/sandbox \
--policy-set-definition bebfcba2-e789-4da6-9043-726ef3a00d02 \
--params '{"listOfAllowedLocations":{"value":["canadacentral","canadaeast"]},"effect":{"value":"Deny"}}' \
--enforcement-mode DoNotEnforce
Check the parameter names of the policy set with az policy set-definition show --name bebfcba2-… --query parameters (the SLZ library assignments use effect and listOfAllowedLocations).
L3 readiness: inventory non-confidential VMs and CMK coverage
az graph query -q " resources | where type =~ 'microsoft.compute/virtualmachines' | extend size=tostring(properties.hardwareProfile.vmSize), sec=tostring(properties.securityProfile.securityType) | summarize vms=count() by size, sec | order by vms desc" -o table az graph query -q " resources | where type =~ 'microsoft.storage/storageaccounts' | extend keySource=tostring(properties.encryption.keySource) | summarize count() by keySource" -o table
Size Sec Vms ----------------- ------------------- ----- Standard_D4s_v5 TrustedLaunch 37 Standard_B2s 12 Standard_DC4as_v5 ConfidentialVM 3 KeySource Count_ ------------------ -------- Microsoft.Storage 58 Microsoft.Keyvault 6
Lab 5: try sovereign controls in a sandbox (about 25 minutes, free; read-only for confidential VMs, do not create them)
platform/slz/architecture_definitions/slz.alz_architecture_definition.json, and draw the 15 management groups and the archetype of each in your notes (compare with Figure 5-1).sov-l1-trial command block. In a sandbox subscription, create a resource group and a storage account in eastus. After trigger-scan, confirm that they show as non-compliant but were still created.az vm list-skus -l canadacentral --query "[?starts_with(name,'Standard_DC')].name" -o tsv. Do not create any VMs.sov-l1-trial assignment and the eastus resources.Case 1: a provincial government layers sovereign controls on an existing ALZ
Problem: the existing ALZ has been running for two years. A new regulation requires personal information systems to keep their data in Canada and use customer-managed keys. Approach: no rebuild. Following the official “variant” approach, add custom archetypes to the existing hierarchy: add L1 at the intermediate root (allow canadacentral and canadaeast), add L2 at corp (CMK in audit first), and create a new confidential_corp that hosts only Secret-level systems. Record global services (Front Door, DNS) in the exception register. Result: completed in six weeks, with no existing subscriptions migrated.
Case 2: L3 Deny blocks a new project
Problem: a bank deployed SLZ’s confidential_corp as-is. The first project needed a VM size and a PaaS service that were not on the allowed list, so all deployments were denied. Approach: following the official advice, change L3 to measure first. Set the assignments to DoNotEnforce for two months, collect requirements and expand the allowed lists (parameters allowedResourceTypes / allowedVirtualMachineSKUs), then enforce.
Case 3: CMK rotation makes a storage account unavailable
Problem: to meet L2, the team configured a storage account with a CMK from Key Vault. The security team then removed the storage account’s managed identity permission on the key, following least privilege, and the account data became inaccessible. Approach: manage the identity grants for the CMK in platform IaC and disable direct portal changes. Turn on purge protection in Key Vault. Include key rotation drills in the quarterly operations schedule.
Deeper issues (sovereign controls are new in this course, so earlier lessons have no matching troubleshooting)
After deploying the slz architecture, all resource creation is rejected: disallowed by policy … Enforce-Sov-L1-Regions
Root cause: the allowed regions list in the data residency assignment defaults to empty, and it was not filled in the IaC. Diagnosis: az policy assignment show -n Enforce-Sov-L1-Regions --scope /providers/Microsoft.Management/managementGroups/slz --query parameters. Fix: set the list in policy_assignments_to_modify (or in the Bicep parameter file), then redeploy. The Accelerator input file usually asks for this value.
Creating a VM in confidential_corp is denied: Allowed virtual machine size SKUs
Root cause: the “allowed virtual machine sizes” policy in the L3 policy set defaults to Deny and allows only confidential computing SKUs. Fix: use a confidential SKU from the list (such as the DCasv5 or ECasv5 series; check the list and regional availability). If the workload does not really need L3, place it in corp rather than making an exemption in confidential_corp.
Global services (Front Door, Traffic Manager) are denied or show as non-compliant under L1
Root cause: these services have the location global and do not belong to a specific region. Fix: decide according to the organization’s rules. Either add global to the allowed list and register an exception, or use resourceSelectors / exemptions for specific resource types. The official documentation requires data residency exceptions for global networking, DNS and similar services to be documented.
The CMK policy (Enforce-Sov-L2-CMKP) shows many non-compliant resources, but no requests are denied
Root cause: the SLZ library sets the effect of the two CMK assignments to Audit. This is intentional: not every service supports CMK, so measure first, then decide. Fix: enable CMK in batches by service. For services that must be enforced, use an override to change them individually to Deny.
Apps in the public management group cannot peer with the API in corp
Root cause: Deny-L3-IP-Routing on public denies cross-subscription VNet peering and hybrid network resources. This is by design: there should be no three-tier private connectivity between public and confidential workloads. Fix: follow zero trust and use authenticated API calls instead (for example, through public endpoints behind Front Door or API Management), or provide a private endpoint on the corp side (the exception approach described in the official documentation).
1. List all assignments in the tenant that reference the data residency policy set, along with their allowed regions parameter.
az graph query -q " policyresources | where type =~ 'microsoft.authorization/policyassignments' | where tostring(properties.policyDefinitionId) endswith 'bebfcba2-e789-4da6-9043-726ef3a00d02' | project name, scope=tostring(properties.scope), allowed=properties.parameters.listOfAllowedLocations.value" -o jsonc
2. List the available VM sizes in canadacentral that start with Standard_DC.
az vm list-skus -l canadacentral --resource-type virtualMachines --query "[?starts_with(name,'Standard_DC')].name" -o tsv
A healthcare group has three types of systems: a public website, an internal shift scheduling system, and a patient genomic data analysis platform. Give a placement plan and the controls for each, based on the SLZ classification and management groups.
Public website → public: ALZ default security policies, no sovereign controls. It must not have three-tier connectivity to confidential workloads. Internal scheduling (Internal / Confidential) → corp: L1 data residency (canadacentral, canadaeast) + L2 (TLS / HTTPS enforced, CMK audited first and then enforced per service). Genomic data (Secret; DNA is the example in the official table) → confidential_corp: L1 + L2 + L3 (confidential VMs / containers, Secure Key Release, Managed HSM). Roll out L3 in audit mode first to gather readiness data, then enforce. Record global service residency exceptions in writing. Use the regulatory compliance policy sets and the Defender compliance dashboard for measurement.
Verified instructional video
Official documentation
- Sovereign Landing Zone (SLZ)
- Controls and principles in Sovereign Landing Zone
- Implement controls and principles in SLZ
- SLZ implementation options
- Azure Landing Zones Library: platform/slz
Video storyboard script (about 90 seconds)
This courseware cannot generate a video or MP3 directly. The storyboard and narration script are provided so you can hand them to a video tool.
Visual: the familiar ALZ management group tree, with three new nodes under landingzones: public, confidential corp and confidential online.
Narration: Sovereign Landing Zone is a variant of ALZ. The same principles apply, with three more management groups and a set of sovereign policies.
Visual: a data classification table from Public to Secret. Three rows of controls light up level by level.
Narration: The more sensitive the data, the more controls you layer on: data residency, customer-managed keys and confidential computing.
Visual: a confidential VM presents evidence to an attestation service. Key Vault then releases a key.
Narration: Encryption in use relies on a hardware trusted execution environment. Keys are released only to an environment that passes attestation.
Visual: three layers of colored glass are placed directly on top of an existing ALZ, rather than tearing it down and rebuilding it.
Narration: You do not need to replace the existing landing zone. Add controls on top step by step, starting with audit.
Module 6 · Large-scale organizations: multitenancy, multiple regions and platform team operations
- State the CAF position on multitenancy: prefer a single tenant. When multiple tenants are needed, ALZ must be deployed separately in each tenant, and cross-tenant operations use Azure Lighthouse and multitenant applications.
- Design the hierarchy and operations for multiple regions. Do not create management groups by region. Express regional differences through policy parameters, regional hubs and subscription vending parameters.
- Use the CAF shared management model to split responsibilities between the platform team and workload teams, and write a RACI.
- Design a release ring for platform changes (library version upgrades, new policies): sandbox tenant → canary hierarchy → production. Define communication and rollback.
What: multitenancy
Management groups, policies and RBAC cannot span Entra tenants. CAF’s advice is direct: use a single tenant (usually the company’s main tenant), and add tenants only when the main tenant truly cannot meet the requirements. Common valid reasons for multiple tenants: an acquired company not yet merged (a subsidiary that may be sold in the future), a tenant used only to test Entra and Microsoft 365 configuration (no Azure workloads), and special regulated environments that require isolation.
| Problems that multitenancy brings | CAF’s recommendation |
|---|---|
| Each tenant needs its own hierarchy and policies | Deploy ALZ separately in each tenant. Use the same IaC repository, with configuration files and pipeline environments per tenant. |
| Operators must switch between multiple identities | Azure Lighthouse cross-tenant delegation (built-in roles only, Owner is not supported; hour 3). B2B collaboration, cross-tenant access settings, cross-tenant synchronization and multitenant organization features |
| Tools (ITSM, scanning) must connect to multiple tenants | Use an Entra multitenant application, rather than creating a service principal in each tenant |
| Licensing and cost | Licenses such as P1 / P2 do not cross tenants. One EA enrollment or MCA billing account can provide subscriptions for several tenants. |
| Moving a subscription to another tenant | Moving a subscription is complex and removes role assignments. It is usually easier to control if you rebuild the workload in the target tenant. |
What: multiple regions
- Do not create management groups by region (CAF recommendation from hour 1). Regional differences go into policy parameters (allowed regions, regional parameters for DNS zones), networking (one hub per region, hour 4) and subscription vending parameters (region, address pool).
- Platform resources are replicated per region: hubs, firewalls, Resolver and private DNS zone links. Whether the log workspace is split by region depends on data residency and cost (Hour 5, Module 1).
- Routing symmetry across regions (Module 4) and capacity (quota groups, SKUs available in each region) are the most common operational problems in multi-region setups.
How: operating model and RACI
CAF’s shared management model: the platform team provides governance, subscription vending, hub-and-spoke networking, inner-source IaC modules based on AVM, and developer tools. Workload teams run their own subscriptions independently within the boundaries the platform sets. Both sides use a responsibility matrix to clarify ownership, and SLAs and operational metrics to govern collaboration. Large organizations should split the platform team by capability area (onboarding, design and build support, security and governance, identity, networking). Each team should stay at “two-pizza” size (6–10 people). Networking, IaC / DevOps, identity and security should each have at least 2 people so they can back each other up.
| Activity | Platform team | Network team | Security team | Workload team | FinOps |
|---|---|---|---|---|---|
| Management group hierarchy and ALZ version upgrades | R / A | C | C | I | I |
| Add or tighten a Deny policy | R | C | A | C (during the audit data period) | I |
| Policy exemption approval | R (execute) | C (network category) | A | R (request, remediate) | — |
| Subscription vending and placement | R / A | C (address pool) | I | R (request) | C (budget) |
| Hub, firewall rules, DNS zones | C | R / A | C | R (submit requirement) | — |
| Resources and alerts within the workload | C | — | C | R / A | I |
| DINE remediation failures | R / A | C (network DINE) | I | I | C (log cost) |
| Cost anomalies | C | — | — | R | A |
R = executes, A = final accountability (only one per row), C = consulted, I = informed. The table is a course example, not the original CAF text. CAF only requires that you “establish a responsibility matrix”.
How: release ring for platform changes
- Dev / sandbox tenant: deploy a complete ALZ with the same IaC to validate new library versions (the ALZ Library publishes calendar versions monthly, such as
2026.10.0→2026.11.0) and provider upgrades. - Canary hierarchy: an independent intermediate root in a production tenant with the same structure as the production hierarchy (for example
alz-canary), containing only the platform team’s own test subscriptions. - Production: new policies are first published as
DoNotEnforce, with an announcement and audit data. They are enforced after an agreed window (the gradual rollout from Module 3). - Rollback: roll IaC back to the previous library version. Use an override to downgrade Deny to Audit. DINE cannot roll back what it has already deployed, so it needs an extra cleanup script.
When: signals and metrics
- Subscription delivery time (request to ready to use), number of exemptions and their average lifetime, DINE remediation failure rate, compliance rate trend, and incidents caused by platform changes.
- When workload teams often bypass the platform (building their own networking, asking for Owner), the platform product is not meeting their needs. See Module 7.
- “Multiple tenants can share one set of management groups and policies.” No. Each tenant needs its own ALZ deployment.
- “With many regions, you need management groups per region.” CAF explicitly advises against this. Express regional differences with parameters and networking.
- “The platform team handles everything, and workload teams only write code.” That is a centralized model, and it becomes a bottleneck at scale. The ALZ principle of subscription democratization requires workload teams to own their subscriptions.
- “Upgrading the library just means changing one ref.” A new version can change policy definition versions and add or retire assignments, so it must go through the release ring.
Overview of multitenancy and multiple regions
Platform change release ring
Incident dispatch drill
Draw a random event card, then use this module’s RACI to pick the team that is “accountable (A)”. The system gives a reference answer with the reasoning and keeps a running score. The answers are based on the example RACI on the principles page. Your organization may differ, but each row can have only one A.
Cross-tenant: Lighthouse delegation and Resource Graph
# Management tenant: list the subscriptions delegated from customer tenants az managedservices assignment list --include-definition -o table # Delegated subscriptions can be queried directly in Resource Graph (cross-tenant compliance inventory) az graph query -q " resourcecontainers | where type =~ 'microsoft.resources/subscriptions' | project name, subscriptionId, tenantId" -o table
Multitenant IaC: one repository, multiple configurations
platform-landing-zone/
├── modules/ # shared: avm-ptn-alz calls, connectivity modules
├── config/
│ ├── contoso/ # one per tenant: tenant ID, management group prefix, region, library version
│ │ ├── inputs.yaml
│ │ └── platform-landing-zone.tfvars
│ └── fabrikam/
│ ├── inputs.yaml
│ └── platform-landing-zone.tfvars
└── .github/workflows/
├── cd-contoso.yml # separate environment, approvals and federated credentials per tenant
└── cd-fabrikam.yml
Library version: review the differences before upgrading
# List recent ALZ Library releases (calendar versions) curl -s "https://api.github.com/repos/Azure/Azure-Landing-Zones-Library/releases?per_page=10" \ | python3 -c "import json,sys;[print(r['tag_name'],r['published_at'][:10]) for r in json.load(sys.stdin)]" # After changing the ref to the new version in Ring 0 / Ring 1, review only the resources that will be replaced or deleted terraform plan -out tfplan && terraform show -json tfplan \ | python3 -c "import json,sys;p=json.load(sys.stdin);[print(c['change']['actions'],c['address']) for c in p['resource_changes'] if c['change']['actions'] not in (['no-op'],['read'])]"
platform/alz/2026.11.0 2026-11-06 platform/slz/2026.11.0 2026-11-06 platform/amba/... platform/alz/2026.10.0 2026-10-05 ['update'] module.alz.azapi_resource.policy_assignments["landingzones/Enforce-GR-Network0"] ['create'] module.alz.azapi_resource.policy_definitions["alz/Enforce-Guardrails-Automation_20260910"]
Canary hierarchy
# Mirror of the production hierarchy with prefixed IDs (the same architecture definition is used in IaC; only the prefix and parent change) az account management-group create --name alz-canary --display-name "ALZ (canary)" az account management-group create --name canary-landingzones --parent alz-canary az account management-group create --name canary-corp --parent canary-landingzones
Lab 6: draft the skeleton of an operations handbook (about 30 minutes, free)
alz-canary mirror hierarchy (use the command block) and record the entry criteria.Case 1: three acquired companies, three tenants
Problem: the group has 3 Entra tenants, each with its own differently styled landing zone. Approach: following CAF, do not force a merge of the tenants. Use the same IaC repository to deploy ALZ to all three tenants (unified library version and policies), with a separate pipeline environment and federated credentials for each tenant. The platform team gets built-in role delegation in the two subsidiary tenants through Lighthouse. The authorization requires Entra ID Governance licensing in the management tenant (hour 3). Result: policy consistency is visible in a single Resource Graph query.
Case 2: the platform team becomes a bottleneck
Problem: all firewall rules, DNS records and subscription requests go through platform team tickets, with an average wait of 9 days, and workload teams have started running production workloads in the sandbox. Approach: following CAF, split the platform team into three squads: “onboarding and subscription vending”, “networking”, and “governance and security”. Subscription requests become self-service (Module 7). Firewall rule changes become PRs from workload teams, approved by the networking team.
Case 3: a library upgrade brings new assignments, and widespread errors appear on Monday morning
Problem: on Friday, the library ref was upgraded directly in production. The new version added a guardrail policy set assignment to landingzones, and on Monday workload team deployments failed. Approach: set up a release ring. New assignments are always published first as DoNotEnforce, with an announcement. Make “assignments that show up as create in the plan” a manual approval gate.
Deeper issues (for tenant and Lighthouse onboarding errors, see Hour 3, Module 8)
Deploying a second tenant with the same IaC: management group ID conflict or Conflict
Root cause: management group IDs must be unique within a tenant, but many teams’ configuration files hard-code IDs such as alz and corp. If the second tenant already has an old management group with the same name, you get a conflict. Fix: set a management group ID prefix for each tenant (the Accelerator supports custom IDs, a fact from hour 1), or rename and migrate the old management groups first.
Cross-tenant Resource Graph query returns only subscriptions from the local tenant
Root cause: Resource Graph only covers subscriptions the caller can access. Cross-tenant visibility requires Lighthouse delegation: delegated subscriptions appear in the managing tenant’s query results. B2B guest identities must sign in to the other tenant. Fix: for read-only operational needs, set up Lighthouse delegation (Reader) rather than creating guest accounts in each tenant.
Subscription deployment in a new region fails: SKU unavailable or quota insufficient
Root cause: subscription vending only creates the subscription. It does not guarantee that the new region has the same SKUs and quota. The ALZ regional policies may also not include the new region yet. Fix: use a region go-live checklist: allowed regions parameter, hub and address pools, regional parameters for private DNS zones, quota groups or quota requests, and regional support for Defender and monitoring. Validate in the canary hierarchy first.
After upgrading the library version, the plan shows many policy assignments as “replace”
Root cause: the definition an assignment references was replaced with a versioned one (for example Enforce-Guardrails-Automation → …_20260910, a fact from hour 2), or the assignment name or scope changed. A replacement means delete and recreate. The system-assigned managed identity changes, and cross-scope roles must be granted again (Module 3). Fix: confirm the scope of the replacements in Ring 0 / Ring 1. For DINE assignments, prepare the role re-grants and a remediation plan. If needed, split the upgrade into two steps.
1. In the management tenant, list all Lighthouse delegations and the role definitions each one includes.
az managedservices assignment list --include-definition \
--query "[].{name:properties.registrationDefinition.properties.registrationDefinitionName,tenant:properties.registrationDefinition.properties.managedByTenantId}" -o table2. Count the VNets per region under each management group (for multi-region planning).
az graph query -q "
resources
| where type =~ 'microsoft.network/virtualnetworks'
| join kind=leftouter (resourcecontainers | where type =~ 'microsoft.resources/subscriptions'
| project subscriptionId, mg=tostring(properties.managementGroupAncestorsChain[0].name)) on subscriptionId
| summarize vnets=count() by mg, location
| order by mg asc" -o tableA multinational operates in Canada and the EU. The EU subsidiary requires its data to stay in the EU, and legal suggests “a separate tenant for the EU”. How would you evaluate this?
First separate the requirements. Data residency is a requirement about where data is stored. L1 data residency policies, regional hubs and subscription placement can meet it within a single tenant. The data location of the Entra tenant itself is set by the country or region chosen when the tenant was created. A separate tenant is only needed if legal requires that identity data also stay in the EU. Benefits of a single tenant: one ALZ, unified identity and collaboration, and no duplicate licensing. Costs of multiple tenants: each tenant needs its own ALZ deployment, cross-tenant operations are harder (Lighthouse limits: no Owner, built-in roles only), and B2B support for services is limited. Write the conclusion as an ADR: default to a single tenant with EU region policies and an EU-specific landing zone. Create a second tenant only if identity data residency is explicitly required or the subsidiary may need to be sold, and deploy it with the same IaC.
Verified instructional video
Official documentation
- CAF: Multitenant Azure landing zone considerations and recommendations
- CAF: Shared management cloud operations
- CAF: Testing approach for Azure landing zones
Video storyboard script (about 90 seconds)
This courseware cannot generate a video or MP3 directly. The storyboard and narration script are provided so you can hand them to a video tool.
Visual: three tenants, each with its own management group tree, connected in the middle by a Lighthouse beam.
Narration: Management groups and policies cannot span tenants. In a multitenant setup, each tenant must deploy its own ALZ.
Visual: a RACI table lights up row by row, with only one A per row.
Narration: Under the shared management model, the platform team provides capabilities, and workload teams run autonomously within the boundaries. The responsibility matrix removes finger-pointing.
Visual: the library version number jumps from 2026.10.0 to 2026.11.0, moving first into the sandbox, then the canary, and finally production.
Narration: Platform changes also go through a release ring.
Visual: a new Deny policy first shows “Audit”. Only after the countdown ends does it change to “Enforce”.
Narration: Announce first, audit first, then enforce. That is how the platform earns the trust of workload teams.
Module 7 · Platform as a product: golden path and self-service
- Using CAF’s idea of “platform capabilities as internal products”, describe the ALZ platform: modular, discoverable and self-service, with a backlog and roadmap, and with feedback collected from users.
- Design a golden path: from the subscription request to the first deployable environment, fully self-service and secure by default.
- Define SLAs / SLOs and metrics for platform services (delivery time, exemption lifetime, DINE failure rate, DORA metrics).
- Shift compliance checks left, to the request and PR stages, so they do not only reject deployments at the end of the pipeline.
What: treating platform capabilities as products
CAF’s shared management operating model notes that the model works best when the platform team has a product mindset and delivers reusable self-service capabilities. This matches the industry trend toward platform engineering. CAF’s examples of platform services are Azure governance (management groups, policy definitions), subscription vending, hub-and-spoke networking, inner-source IaC modules based on AVM, and developer tools such as an internal developer platform (IDP). For each capability:
- Modular and reusable: workload teams can use it on its own (for example, only a subscription, or only the private endpoint module).
- Discoverable and self-service: a service catalog, documentation and automation that reduce dependence on the platform team.
- Backlog and roadmap: prioritized by internal customer needs. Collect feedback through surveys, interviews and telemetry.
What: golden path
A golden path is a complete route that the platform team recommends and supports. Teams that take it get compliance, observability and support by default. It is not the only mandatory path, but it should be the easiest path. Example with myapp in corp:
| Step | What the workload team does | Automated by the platform | Related lesson |
|---|---|---|---|
| 1 Request | Fill in a form (app name, environment, data classification, budget, owner) | Validates naming, tags and budget; allocates an address from IPAM | Hour 2, hour 4 Module 2 |
| 2 Vend | Review the auto-generated PR | Subscription alias, placement in corp (or confidential_corp), spoke VNet and peering, budget, deployment identity and federated credentials | Hour 6 Module 5, hour 3 Module 6 |
| 3 Start | Generate the application repository from a template repository | Pipeline (OIDC), private endpoint module, diagnostic settings, alerts | Hours 5, 6 |
| 4 Run | Operate autonomously in your own subscription | Policy guardrails, DINE, Defender, cost reports | Hours 1–5 |
| 5 Retire | Submit a retirement request | Move to decommissioned, delete at expiry | Hour 1 |
How: shift compliance left
Deny only rejects at deployment time, which is too late for feedback. Bring the same rules forward:
- Request stage: form fields with validation (the region can only be chosen from the allowed list, and data classification determines the management group).
- PR stage:
terraform plan/az deployment … what-if, plus static IaC checks (tools such as PSRule for Azure or Checkov). The platform’s IaC modules are compliant by default. For example, subnets get an NSG by default, and storage blocks public access and HTTP by default. - Deployment stage: Azure Policy is still the last line of defense and must not be skipped.
How: SLA / SLO and metrics
| Platform service | Example SLO | Metric source |
|---|---|---|
| Subscription vending | Non-production ≤ 1 business day, production ≤ 3 business days (including approval) | Creation and closing time of the request Issue |
| Exemption approval | ≤ 2 business days; default expiry 90 days | metadata and expiresOn of the exempted object |
| Platform change announcement | New Deny policies are published in audit mode at least 14 days in advance | Change log |
| Platform availability | Availability targets for hub connectivity and DNS resolution | Connection Monitor, Resolver metrics |
| Delivery capability of the platform repository | DORA: deployment frequency, lead time for changes, change failure rate, time to restore service | Platform pipeline |
The numbers are course examples, not official commitments. CAF only requires that you “establish service levels and metrics and review them regularly”.
When: how to tell the product has a problem
- Long-running production workloads in the sandbox; workload teams asking for subscription Owner; the number of exemptions keeps growing; the same problem keeps coming up in support channels.
- “The golden path is the only mandatory path.” It is the recommended, supported and easiest path. Teams that deviate take on more responsibility themselves, but they are still bound by the policy guardrails.
- “With Azure Policy, you don’t need templates.” Policy only says no. Templates tell teams how to do it right.
- “A platform as a product means buying a portal.” The core is product management practice (users, backlog, feedback, SLAs). The IDP is only one of the interfaces.
- “Self-service means no approvals.” Requests for production subscriptions and for Secret data classification still need a human approver. But the approval should happen on the PR, not by email.
Layers of the platform product
From request to delivery: a pipeline driven by one form
Ticket vs self-service: delivery time comparison
Turn the automation capabilities on or off and compare the time to deliver a deployable environment through the “traditional ticket” route and the “golden path”. The times are course example values (working hours), used to show where the bottleneck is. They do not represent any organization’s actual measurements.
Subscription request form (GitHub Issue Form)
# .github/ISSUE_TEMPLATE/landing-zone-request.yml
name: Request an application Landing Zone
description: Self-service request for one subscription (corp / online / confidential_corp)
labels: ["lz-request"]
body:
- type: input
id: app
attributes: { label: Application name (lowercase letters and digits, 3–12 characters), placeholder: myapp }
validations: { required: true }
- type: dropdown
id: env
attributes: { label: Environment, options: [dev, test, prod] }
validations: { required: true }
- type: dropdown
id: classification
attributes: { label: Data classification, options: [Public, Internal, Confidential, Secret] }
validations: { required: true }
- type: dropdown
id: connectivity
attributes: { label: Network type, options: [corp (private, via hub), online (internet-facing)] }
- type: input
id: budget
attributes: { label: Monthly budget (CAD), placeholder: "500" }
validations: { required: true }
- type: input
id: owner
attributes: { label: Owner (Entra group name), placeholder: grp-myapp-owners }
validations: { required: true }
Sample script that generates the vending configuration from the form
ISSUE=42
gh issue view $ISSUE --json body -q .body > req.md
# Simplified parsing: in practice, use a GitHub Action (such as an issue-form parser) to get JSON
APP=$(grep -A2 'Application name' req.md | tail -1); ENV=$(grep -A2 '### Environment' req.md | tail -1)
CLS=$(grep -A2 'Data classification' req.md | tail -1)
case "$CLS" in Secret) MG=confidential_corp ;; *) MG=corp ;; esac
cat > "lz/${APP}-${ENV}.yaml" <<EOF
name: sub-lz-${MG}-${APP}-${ENV}
management_group_id: ${MG}
location: canadacentral
virtual_network: { ipam_pool: pool-cc, size: 24 }
budget: { amount: 500, contact_group: grp-${APP}-owners }
tags: { env: ${ENV}, owner: grp-${APP}-owners, costCenter: cc-1000, workload: ${APP} }
EOF
git switch -c lz/${APP}-${ENV} && git add lz/ && git commit -m "LZ request #${ISSUE}" && gh pr create --fill
Metric: median subscription delivery time
gh issue list --label lz-request --state closed --limit 200 --json createdAt,closedAt \
| python3 -c "
import json,sys,statistics,datetime as d
f=lambda s:d.datetime.fromisoformat(s.replace('Z','+00:00'))
h=[(f(i['closedAt'])-f(i['createdAt'])).total_seconds()/3600 for i in json.load(sys.stdin)]
print('requests',len(h),'median hours',round(statistics.median(h),1),'p90',round(sorted(h)[int(len(h)*.9)-1],1))"
requests 37 median hours 6.4 p90 27.0
Platform health: exemptions and remediation
# Exemption count and average days open, by category
az graph query -q "
policyresources
| where type =~ 'microsoft.authorization/policyexemptions'
| extend created=todatetime(properties.metadata.approvedOn), cat=tostring(properties.exemptionCategory)
| summarize n=count(), avgDays=avg(datetime_diff('day', now(), created)) by cat" -o table
Lab 7: build a minimal golden path for your platform (about 40 minutes, free)
confidential_corp.location is on the allowed list, that the four required tags are present, and that the management group matches the data classification. On failure, explain the reason in a PR comment.lz/*.yaml. Otherwise, validate only up to the PR.docs/ folder of the repository.Case 1: from 9 days to 4 hours
Problem: subscription requests went through an ITSM ticket and needed three manual approvals (network, security, finance) plus manual network setup. Approach: form field validation + automatic IPAM allocation + automatic approval for non-production + production approved on the PR. Network and security rules were written into PR checks. Result: median for non-production was 4 hours and for production 1.5 days. The “shadow production” in the sandbox dropped to zero within three months.
Case 2: the golden path falls behind the policies
Problem: the platform enforced a new storage policy on landingzones, but the storage module in the application template repository was not updated, so the first deployment of a new project was denied. Approach: add “template repository tested by deploying through the canary hierarchy” to the entry criteria for platform changes (the Module 6 release ring). Update the template and the policy in the same release.
Case 3: documentation nobody reads
Problem: 60% of support channel questions already have answers in the documentation. Approach: embed the documentation links in the policy non-compliance messages (nonComplianceMessages, hour 2) and in the failure comments from PR checks, so the answer appears where users hit a wall.
Deeper issues (for pipeline and vending module errors, see Hour 6, Module 4 and Module 5)
Self-service request is only rejected with RequestDisallowedByPolicy at the apply stage
Root cause: compliance checks exist only in Azure Policy, with no matching validation in the request and PR stages. Or the PR check rules are out of sync with the policy parameters (for example, the allowed regions list is maintained in two places). Fix: have the PR check read its parameters from the same source (for example ALZ’s policy_default_values, or the EPAC parameter file, Hour 6, Module 6), and run plan / what-if in the PR.
The form was submitted, but no PR was generated, and the requester does not know what happened
Root cause: the workflow that parses the Issue failed. The field titles were changed, the permissions were insufficient, or GITHUB_TOKEN cannot trigger follow-up workflows. Fix: when the workflow fails, post a comment back on the Issue and add the label lz-request-failed. Create the PR with a GitHub App or a token with sufficient permissions, so that PR workflows are triggered. Use field IDs, not titles, as the parsing key.
The delivery time SLO looks good, but teams are still complaining
Root cause: the metric only covers “subscription creation” and does not cover “first successful application deployment”. The real wait may be in firewall rule changes, DNS records or exemption approvals. Fix: define the SLO as “request to first successful deployment”, measure firewall rule PRs and exemption approval cycles separately, and run quarterly user interviews.
A year later, many projects generated from the template repository are non-compliant
Root cause: the template is “copy and fork”, so later platform improvements never flow back to projects that were already generated. Fix: turn the reusable parts into versioned modules (inner-source AVM modules) instead of copying code. Use Dependabot or Renovate to push module upgrade PRs. Report compliance by module version.
1. Count the subscriptions created each month over the past 90 days (the output of subscription vending).
az graph query -q " resourcechanges | where properties.targetResourceType =~ 'microsoft.resources/subscriptions' | where properties.changeType =~ 'Create' | summarize subs=count() by month=startofmonth(todatetime(properties.changeAttributes.timestamp))" -o table
The retention period of resourcechanges is limited (check the official documentation). For long-term metrics, use the PR records in the vending repository as the source of truth.
2. List subscriptions without an owner tag, as an “unowned subscriptions” list.
az graph query -q " resourcecontainers | where type =~ 'microsoft.resources/subscriptions' | where isempty(tostring(tags.owner)) | project name, subscriptionId" -o table
The platform team has 5 people, the workload teams have 40, there are 15 new environment requests per week, and another 30 firewall rule requests per week. Which two self-service capabilities would you build first, and why?
Sort by “workload × waiting time”. ① Firewall rules have the highest volume. Change them so that workload teams submit PRs to modify their own rule collections in the firewall policy's rule collection groups, with networking team approval, combined with PR checks (no any-any rules, and a ticket number is required). ② Subscription requests: form + automatically generated PR + IPAM, with automatic approval for non-production. Both change people from executors to approvers, and both produce measurable data (PR cycle time). Build the documentation and the links in non-compliance messages at the same time.
Verified instructional video
Official documentation
- CAF: Shared management cloud operations (Build platform capabilities as internal products)
- Microsoft Learn: Platform engineering
- CAF: Subscription vending
Video storyboard script (about 90 seconds)
This courseware cannot generate a video or MP3 directly. The storyboard and narration script are provided so you can hand them to a video tool.
Visual: two paths. One is a muddy little road covered in ticket and approval stamps. The other is a smooth “golden path”.
Narration: If going through the platform is slower than going around it, teams will go around the platform.
Visual: a developer fills in a form, and a few seconds later a PR appears automatically with the address range and budget.
Narration: Self-service requests change people from executors into approvers.
Visual: a PR check flags a disallowed region in red early. The developer fixes it, and the check passes.
Narration: Shifting compliance checks left into the PR is much friendlier than being rejected at deployment time.
Visual: the dashboard shows the median delivery time dropping from 9 days to 4 hours.
Narration: A platform is a product. It has users, a backlog, SLAs and metrics.
Module 8 · Combined failure blind box
- Handle ALZ faults with one consistent triage method: symptom → layer (governance / identity / network / DNS / operations) → evidence → hypothesis → fix → prevention.
- Without knowing the answer in advance, use the fewest clues (commands) to locate each of the 12 faults in this lesson.
- For each fault, write down the prevention, not only the fix: which process, query or policy would stop it from happening again.
What: triage card
| Step | Ask yourself | Preferred evidence |
|---|---|---|
| 1 Symptom | What is the exact error? Is it a rejection (403), a timeout, a wrong answer, or something that should have happened but did not? | The error code, additionalInfo, activity log |
| 2 Scope | One resource, one subscription, one region, or everything? What changed recently (a subscription move, a library upgrade, an exemption expiring)? | Change records, resourcechanges, platform repository commits |
| 3 Layer | Governance (policy), identity (RBAC / identity), network (routing / filtering), DNS, operations (process) | See table below |
| 4 Hypothesis and verification | Change only one variable to verify | Control group: does the same operation succeed in the sandbox or in another subscription? |
| 5 Fix and prevention | Will the fix be overwritten at the next deployment? How do you make sure it does not happen again? | IaC change, query alert, process |
Mapping from symptom to layer
| Symptom | Most likely layer | Module in this lesson |
|---|---|---|
| RequestDisallowedByPolicy | Governance: Deny, expired exemption, most restrictive wins, SLZ parameters | 2, 3, 5 |
| NonCompliant and nothing deployed / deployment Failed | Governance + identity: 7-stage DINE pipeline | 3 |
| Compliance state keeps flipping | Governance: conflicting multiple assignments, IaC and Modify overwriting each other | 3 |
| AuthorizationFailed (for people) | Identity: inherited role changes, token caching | 2, 6 |
| Handshake failure, connection dropped midway | Network: asymmetric routing | 4 |
| NXDOMAIN / resolves to old IP / SERVFAIL | DNS: duplicate zones, links, forwarding loops | 4 |
| Wrong source IP seen by the target | Network: firewall SNAT | 4 |
| “Everything failed Monday morning” | Operations: platform change skipped the release ring | 6, 7 |
Why: why practice with a “blind box”
The troubleshooting pages in earlier hours are organized as “error → cause”, which is good for lookup. On real on-call duty you only get symptoms. The blind box forces you to pick evidence first, then conclude, and every extra clue you pull has a cost. That cost is the real cost of on-call.
How: the 12 faults in this module
- DINE cross-subscription role missing: private endpoint has no DNS record
- Exemption expired: nightly pipeline's VMSS update is denied
- Two DINE policies deploy a diagnostic setting with the same name: compliance flips
- On-premises to spoke asymmetric routing: connection drops after 30 seconds
- Legacy VNet linked to a private zone with the same name: new storage account returns NXDOMAIN
- Application rule SNAT: on-premises ACL denies
- Inherited PIM eligibility lost after subscription move
- SLZ allowed regions empty: all deployments denied
- Resolver forwarding loop: SERVFAIL
- Library upgrade replaces assignment: new identity has no cross-scope role
- Updating an existing NSG is denied after moving into corp
- Legacy “allowed locations” intersect with ALZ region policy: canadaeast denied
When: when to escalate
- Affects multiple Landing Zones or platform components (hub, DNS, root policy) → P1, handled by the platform team on-call (Module 6 RACI).
- When a policy must be relaxed temporarily, prefer a precise exemption (definition reference ID + expiry date) over changing the whole assignment to DoNotEnforce.
- “Turn the policy off first and see if it's the policy” widens the blast radius and loses evidence. The error and the activity log already tell you which assignment is responsible.
- “Once it's fixed, we're done” — a fix without prevention will happen again at the next library upgrade, subscription move, or exemption expiry.
Triage flow
Capstone fault blind box
Click “Open box” to draw a random fault. Read the symptom first, then pick clues (each clue costs 1 point), then choose one of 4 diagnoses. Full score is 10 points; a correct answer reveals the fix and prevention. All outputs are examples.
On-call toolbox (by layer)
# —— Symptom and recent changes ——
az monitor activity-log list --resource-id <id> --offset 6h --status Failed -o jsonc
az graph query -q "resourcechanges
| where properties.targetResourceId =~ '<id>'
| project time=todatetime(properties.changeAttributes.timestamp), type=tostring(properties.changeType), changes=properties.changes
| order by time desc | take 10"
# —— Governance ——
az policy state list --resource <id> --filter "complianceState eq 'NonCompliant'" --query "[].{a:policyAssignmentName,ref:policyDefinitionReferenceId}" -o table
az policy exemption list --disable-scope-strict-match --query "[].{name:name,exp:expiresOn,a:policyAssignmentId}" -o table
az policy remediation deployment list --name <remediation> --management-group <mg> --query "[?status!='Succeeded']"
# —— Identity ——
az role assignment list --scope <scope> --include-inherited --assignee <upn-or-objectid> -o table
az policy assignment show -n <assignment> --scope <mg-scope> --query identity.principalId -o tsv
# —— Network ——
az network watcher show-next-hop -g <rg> --vm <vm> --source-ip <src> --dest-ip <dst>
az network nic show-effective-route-table -g <rg> -n <nic> -o table
az network firewall policy show -g rg-alz-conn-cc -n afwp-hub-cc --query snat
# —— DNS ——
nslookup <fqdn> # on the source VM
az network vnet show -g <rg> -n <vnet> --query dhcpOptions.dnsServers
az dns-resolver forwarding-rule list -g rg-alz-conn-cc --ruleset-name frs-hub-cc -o table
Turn “prevention” into query alerts
# Weekly: exemptions expiring within 14 days, orphaned role assignments, duplicate privatelink zones, same definition at multiple scopes # Can run as a scheduled Azure Automation or GitHub Actions job, writing results to an Issue (example: exemptions) az graph query -q "policyresources | where type =~ 'microsoft.authorization/policyexemptions' | extend exp=todatetime(properties.expiresOn) | where isnotnull(exp) and exp < now(14d) | project name, exp, owner=tostring(properties.metadata.owner)" -o json \ | gh issue create --title "Exemptions expiring soon ($(date +%F))" --label platform-ops --body-file -
Lab 8 (optional): inject 3 real faults into a sandbox and hand them to a peer to diagnose (about 45 minutes)
nsg-legacy-erp that expires in 10 minutes (Module 3 lab, step 6). After it expires, ask your peer to “change the rule description”, and give them only the exact error text.Case 1: one fault, three layers of cause
Symptom: On Monday morning, all 12 new private endpoints in canadaeast have no DNS records. Triage: the recent change is the Friday library upgrade. Evidence: the remediation deployment failed with AuthorizationFailed (identity layer); the assignment was “replaced” and its principalId changed (governance layer); canadacentral is fine because its endpoints were remediated before the upgrade. Fix: grant the new identity Network Contributor on rg-alz-dns-cc and re-run the remediation. Prevention: use a user-assigned managed identity, and require manual approval whenever an upgrade plan shows an assignment being replaced.
Case 2: the cost of a wrong diagnosis
Symptom: on-premises access to the new spoke is intermittent. The on-call engineer suspected the firewall rules and changed the rule collection to any-any. The problem remained, and a high-risk rule was left behind. Real cause: asymmetric routing. Lesson: collect evidence first (the next hop in both directions, and the denied direction in the firewall logs) instead of trial-and-error configuration changes.
Case 3: the value of an on-call runbook
What they did: one platform team put this module's “symptom-to-layer” map on the front page of its on-call runbook. Each symptom links to the matching query and fix script. The average time for a new hire's first on-call shift to locate a fault dropped from 2 hours to 25 minutes.
Interactive troubleshooting tree: deeper problems in this hour
Start from the symptom and answer the questions step by step. At the end you get diagnostic commands and fix suggestions. For beginner-level problems, use the troubleshooting pages in Hour 2, Hour 3, and Hour 4.
1. Show the last 10 changes to a resource (who made them, when, and what changed).
az graph query -q "resourcechanges | where properties.targetResourceId =~ '<resource-id>' | project time=todatetime(properties.changeAttributes.timestamp), type=tostring(properties.changeType), by=tostring(properties.changeAttributes.changedBy), changes=properties.changes | order by time desc | take 10" -o jsonc
2. List all exemptions inherited by the subscription (including expired ones), and mark which ones have expired.
az policy exemption list --disable-scope-strict-match \
--query "[].{name:name,expires:expiresOn,assignment:policyAssignmentId}" -o tableExpiry check: if expiresOn is earlier than the current time, the exemption no longer applies (the object is still kept).
On the same day you receive three alerts: ① the pipeline in the corp subscription is denied by Deny-Storage-http; ② in the compliance report, compliance for Deploy-Diag-LogsCat drops from 98% to 60%; ③ an application's calls to a local API time out. How do you prioritize and assign them?
First look for a shared “recent change”. If a library upgrade or subscription move happened that day, ② is most likely an identity change caused by an assignment replace (platform team, P1: the largest blast radius, and the missing logs will keep growing). ① is usually existing violations in one subscription or an exemption expiring (workload team R; the platform team provides the exemption process, P2). For ③, first check whether only one application is affected: next hops in both directions and the firewall logs; if it is a new spoke, suspect asymmetric routing or SNAT (network team R). Order: ② → ③ (business outage) → ① (a precise exemption can lift it temporarily). Each one needs a prevention item: an approval gate for upgrades, an exemption expiry report, and a return-path check in network review.
Verified teaching videos
Official documentation
- Troubleshoot common errors - Azure Policy
- Azure Network Watcher overview
- Get resource changes (Resource Graph)
Video storyboard (about 90 seconds)
This courseware cannot generate a video or MP3 directly. A storyboard and narration script are provided, which you can give to a video tool.
Visual: a gift box opens and a card pops up: “Private endpoint has no DNS record.”
Narration: on call, you only have symptoms, not answers.
Visual: the engineer takes only two tools from the toolbox: the remediation deployment error and the identity's role list.
Narration: first ask what changed recently, then pick one piece of evidence that can test your hypothesis.
Visual: the diagnosis card flips over: “Cross-subscription role missing”, and two columns appear below: fix and prevention.
Narration: the fix restores service today; prevention makes sure it doesn't happen again tomorrow.
Visual: twelve fault icons arranged in a circle, lighting up one by one.
Narration: write the prevention for each fault into the platform, and your Landing Zone will become more reliable over time.
Command cheat sheet
1. Brownfield inventory (Resource Graph)
| Purpose | Command / query key points |
|---|---|
| Subscriptions not under alz | resourcecontainers | where type =~ 'microsoft.resources/subscriptions' | where tostring(properties.managementGroupAncestorsChain) !contains '"name":"alz"' |
| Existing assignments and enforcement mode | policyresources | where type =~ 'microsoft.authorization/policyassignments' | project name, properties.scope, properties.enforcementMode |
| Standing Owner | authorizationresources | where type =~ 'microsoft.authorization/roleassignments' | where properties.roleDefinitionId endswith '8e3af657-…' |
| Duplicate address prefixes | mv-expand properties.addressSpace.addressPrefixes | summarize count() by prefix | where count_ > 1 |
| Audit-mode results | policyresources | where type =~ 'microsoft.policyinsights/policystates' | where properties.complianceState =~ 'NonCompliant' |
2. Migration
az account management-group create --name corp-brownfield --parent landingzones az policy assignment create --name bf-<name≤21> --scope <mg-bf> --policy-set-definition <id> --params @p.json --enforcement-mode DoNotEnforce --mi-system-assigned --location canadacentral az role assignment list --scope /subscriptions/<id> --include-inherited -o table # export before the move az account management-group subscription add --name corp-brownfield --subscription <id> az policy assignment list --disable-scope-strict-match -o table # assignments inherited by the subscription az policy state trigger-scan --no-wait az rest --method put --url "https://management.azure.com/subscriptions/<id>/providers/Microsoft.Authorization/policyExemptions/<name>?api-version=2024-12-01-preview" --body @exemption.json # assignmentScopeValidation: DoNotValidate
3. Policy troubleshooting
az policy state list --resource <id> --filter "policyAssignmentName eq '<a>'" -o table
az policy definition show --name <def> --query "policyRule.then.details.{delay:evaluationDelay,roles:roleDefinitionIds}"
az policy assignment show -n <a> --scope <mg> --query identity.principalId -o tsv
az role assignment list --assignee <principalId> --all -o table
az policy remediation create -n <r> --policy-assignment <id> --definition-reference-id <ref> --resource-group <rg>
az policy remediation deployment list -n <r> --management-group <mg> --query "[?status!='Succeeded']"
az policy assignment update -n <a> --scope <mg> --resource-selectors '[{"name":"canary","selectors":[{"kind":"resourceLocation","in":["canadaeast"]}]}]'
| DINE stage | Typical errors | First check |
|---|---|---|
| Trigger / delay / existence condition | No deployment record | Whether the resource already existed; evaluationDelay; existenceCondition |
| Identity / authorization | AuthorizationFailed, Identity not found | Whether principalId changed; roles at the target scope |
| Deployment | ScopeLocked, RequestDisallowedByPolicy, InvalidTemplate | Locks, other Deny policies, placeholder parameters |
| Re-evaluation | Compliance flip | Same-name objects, IaC and Modify overwriting each other |
4. Network and DNS
az network watcher show-next-hop -g <rg> --vm <vm> --source-ip <src> --dest-ip <dst> # check both directions az network vnet subnet show -g rg-alz-conn-cc --vnet-name vnet-hub-cc -n GatewaySubnet --query routeTable.id az network firewall policy show -g rg-alz-conn-cc -n afwp-hub-cc --query snat az network private-dns link vnet update -g rg-alz-dns-cc -z <privatelink-zone> -n <link> --resolution-policy NxDomainRedirect az dns-resolver forwarding-rule list -g rg-alz-conn-cc --ruleset-name frs-hub-cc -o table
| Rule | Key points (official) |
|---|---|
| Network rule SNAT | Destinations in RFC 1918 / RFC 6598 are not SNATed by default; 0.0.0.0/0 = never, 255.255.255.255/32 = always; keep IANAPrivateRanges |
| Application rule SNAT | Always SNAT (transparent proxy) |
| Firewall associated with the policy | Configure in the Firewall Policy's snat.privateRanges; the CLI --private-ranges applies only to classic rules |
| Private zone fallback | VNet link resolutionPolicy: NxDomainRedirect, Private Link zones only, API 2024-06-01+ |
| Same-name private zone | A VNet can link only one zone with a given name |
5. Sovereign Landing Zone (library platform/slz/2026.11.0)
| Assignment | Location | Default effect |
|---|---|---|
| Enforce-Sov-L1-Regions (data residency policy set bebfcba2-…) | slz root | Deny; allowed regions default to empty → must be filled in |
| Enforce-Sov-L2-TLS / -HTTPS | platform child groups, corp, online, confidential_* | Deny / Modify / DINE / AINE |
| Enforce-Sov-L2-CMKP / -CMKM | Same as above | Audit |
| Enforce-Sov-L3-Conf (encryption in use policy set 7a76da03-…) | confidential_corp, confidential_online | Allowed resource types and VM sizes: Deny; TrustedLaunch: Audit |
| Deny-L3-IP-Routing | public | Deny hybrid networking and cross-subscription peering |
6. Operations and platform products
az managedservices assignment list --include-definition -o table # Lighthouse curl -s https://api.github.com/repos/Azure/Azure-Landing-Zones-Library/releases?per_page=5 # library version gh issue list --label lz-request --state closed --json createdAt,closedAt # delivery-time SLO az graph query -q "policyresources | where type =~ 'microsoft.authorization/policyexemptions' | where todatetime(properties.expiresOn) < now(14d)"
Capstone lab + final quiz
Scenario
The ERP team's subscription sub-legacy-erp existed before ALZ. It sits under mg-legacy and has two old assignments, a storage account that allows HTTP, an NSG that opens RDP to the internet, a VNet that overlaps the myapp spoke, and a self-built privatelink zone. Goal: move it into corp within two weeks without interrupting ERP releases. Deliver an assessment report, a migration record, and an operations runbook.
mg-legacy in audit mode to get “what if enforced” results; write a 6-row gap report (dimension, finding, severity, owner, wave).corp level; do a dry run of the ERP pipeline; create a pre-move exemption for Deny-MgmtPorts-Internet with an expiresOn (14 days) and a ticket number (assignmentScopeValidation: DoNotValidate).corp-brownfield, wait for the assessment, and record the non-compliant count; remediate (delete the RDP rule, switch storage to HTTPS only, re-address the VNet or mark it as wave 3); then move into corp.10.0.2.4 (or link the central zone as a fallback). Verify that names resolve to private IPs.mg-legacy (to avoid intersecting with the ALZ region policy), then delete the empty mg-legacy (handle the assignable scopes of custom roles first).az account set -s $SUB_LEGACY
az group delete -n $RG_LEGACY --yes --no-wait
az policy assignment list --scope /providers/Microsoft.Management/managementGroups/corp-brownfield --query "[].name" -o tsv \
| xargs -I{} az policy assignment delete --name {} --scope /providers/Microsoft.Management/managementGroups/corp-brownfield
az account management-group subscription add --name sandbox --subscription $SUB_LEGACY # or keep it in corp
az account management-group delete --name corp-brownfield
az account management-group delete --name mg-legacy
az policy exemption list --disable-scope-strict-match --query "[?contains(name,'pre-move')].id" -o tsv | xargs -r -I{} az policy exemption delete --ids {}
# If you deployed Firewall or a test VM, delete it; finally, revoke elevated access on the root management groupAcceptance checklist
Open-ended self-check (6 questions)
1. Why does CAF recommend “duplicating the Landing Zone management group + audit mode” instead of moving the subscription straight into corp?
After a direct move, existing resources are only audited, but the next update gets denied by Deny, DINE does not fix things automatically, and RBAC inheritance changes. All of these problems hit at once in a single change. Duplicating the management group lets teams see the impact in audit mode and remediate first, at no extra cost. Note that assignments on the upper alz / landingzones groups are still enforced.
2. Name the two most common faults in the 7-stage DINE pipeline at scale, and how to prevent them.
Missing role across scopes (the identity has permissions only at the assignment scope) → declare the additional authorized scope in IaC. Assignment rebuild changes the identity → use a user-assigned managed identity, and approve replace during upgrades. Also acceptable: same-name objects overwrite each other → delete the duplicate assignments.
3. An on-premises connection to a spoke drops after 30 seconds. Give the root cause, the evidence, and two fixes.
Asymmetric routing: the outbound path goes through the gateway directly to the spoke, and the return path goes through the spoke UDR to the firewall. Evidence: next hops in both directions, and denials in the return direction in the firewall logs. Fixes: in the GatewaySubnet route table, point the spoke prefixes to the firewall; or bypass the firewall in both directions (and accept the corresponding security trade-off).
4. What is the relationship between SLZ and ALZ? How do you introduce SLZ incrementally on an existing ALZ?
SLZ is a variant of ALZ with the same design principles and design areas. The differences are in resource organization (public, confidential_corp, confidential_online) and sovereign policies (L1/L2/L3). Incremental path: add data residency at the intermediate root (fill in allowed regions first), add L2 to corp and online (audit CMK first), create confidential management groups for Secret-level systems, and measure L3 before enforcing it.
5. How would you design a release ring for platform changes (for example, a library upgrade)?
Full deployment in the sandbox tenant → a canary mirror hierarchy in the production tenant (IDs contain canary) → production publishes the new policy in audit mode and announces it → enforce after the window. Require manual approval whenever a plan shows an assignment being replaced or created. Roll back with IaC, and downgrade with override.
6. List three metrics that show whether “platform as a product” is working.
Time from request to first successful deployment; number of exemptions and their average lifetime; DINE remediation failure rate and compliance trend; number of incidents caused by platform changes; workload team satisfaction (survey); number of production workloads found in the sandbox.
Sources and versions
Source
| Topic | Source | Page date / version |
|---|---|---|
| Brownfield migration and policy behavior after a move | CAF: Transition an existing Azure environment | 2025-12-19 |
| Duplicate management group + audit mode (recommended method) | CAF: Transition by duplicating a landing zone management group | 2025-12-19 (updated 2026-10-01) |
| Exemption structure, assignmentScopeValidation (preview) | Policy exemption structure; azure-rest-api-specs 2024-12-01-preview | 2026-07-30 |
| Common policy errors | Troubleshoot common errors - Azure Policy | 2025-03-04 (updated 2026-06-12) |
| DINE, remediation, assignment structure, compliance timing | See the shared facts (hour 2): effect-deploy-if-not-exists, remediate-resources, assignment-structure, get-compliance-data | Verified 2026-11-18 |
| Azure Firewall SNAT private ranges | Azure Firewall SNAT private IP address ranges | 2026-08-31 |
| Private DNS fallback to the internet | Fallback to internet for Azure Private DNS zones | 2025-02-04 |
| Sovereign Landing Zone | SLZ overview; Controls and principles; Implement controls; Implementation options | 2025-10-07 / 2026-01-28 (updated to 2026-11-17) |
| SLZ library: management groups, archetypes, assignments | Azure Landing Zones Library platform/slz | platform/slz/2026.11.0 (2026-11-06) |
| Built-in sovereign policy set content | AzAdvertizer: data residency; AzAdvertizer: encryption in use | Accessed 2026-11-18 |
| Status of the old SLZ repository | Azure/sovereign-landing-zone | README: archived in the first half of 2026; as of the 2026-11-18 check, still not archived |
| Multitenant | CAF: Multitenant considerations and recommendations | 2025-12-18 |
| Operating model and platform as a product | CAF: Shared management cloud operations | 2025-07-15 (updated 2026-10-19) |
| canary hierarchy | CAF: Testing approach for Azure landing zones | 2025-03-31 |
| ALZ library, management groups, default assignments, alz provider and module versions | Shared facts file (verified in Hours 1, 2, and 4) | platform/alz/2026.11.0; avm-ptn-alz 0.23.0 |
Video verification note
Every link on the video page was checked on 2026-11-18 through the YouTube oEmbed endpoint (https://www.youtube.com/oembed?url=…&format=json) to confirm the title and channel: gkOh4MjhxIs, VTnqUDMchXA, T7neX1i6iF0, t-i4XrygWCc, clAu7VqpacA, mluS8ovuBKg, fhIn_kHz4hk, 4wGns611G4w, JiUerkqyW0g, rXbamGNz-xQ, V8ChsYAyxTc, 4QxC-hsImzg, ZnoFOTbRvRg, q8DuY7zYfS4, x-Db_AFKCzM, R-5oeguxFpo, mGq442iwAF0, ghzsBm8vOms, rhc5T8caBWo, 8wmfh9nGRCc. Some videos were recorded before this hour, so use this hour and the official documentation for versions and defaults. No verified video was found that covers brownfield migration, cross-scope DINE authorization, or Azure Firewall SNAT in depth, so the related modules provide storyboards instead.
Voice narration notes
The “Voice” tab reads the narration script aloud using the browser's Web Speech API (English voice, en-US). No data is uploaded. If no English voice pack is installed, you can read the narration script directly.
Known limitations
- All Azure CLI commands were written from the official documentation and the CLI help. They have not been run in a real tenant. Outputs (IDs, IPs, times, compliance counts) are examples. Newer parameters such as
--resource-selectorsand--resolution-policyneed a recent CLI version or extension. Check them with-hbefore you run them. assignmentScopeValidationis a preview feature. This hour uses the2024-12-01-previewAPI. For support in the stable API, follow the official documentation.- SLZ sovereign policy sets were still in preview as of 2026-11. The official implementation page describes Bicep support inconsistently, so follow the Accelerator documentation. For the parameter structure of
policy_assignments_to_modifyinavm-ptn-alz, follow the module README. - Error text marked “check against actual behavior” was compiled from the official documentation and has not been verified word for word.
- The animations and simulator are teaching models. The migration timeline numbers, delivery times, RACI answers, and sovereignty decision rules are simplified illustrations. They do not reflect a service's internal implementation or any organization's measured data.
- The RACI, SLO values, and release ring names are course examples. CAF only requires that you establish a responsibility matrix, service levels, and a testing method.