Azure Landing Zone Hour 5: Management and Monitoring
- Design the Log Analytics workspace for the platform. Start from the official principle of “one workspace to begin with”, decide when to split (tenancy, data residency, separation of operations and security, billing), and configure the access control mode, table-level / granular RBAC, table plans (Analytics / Basic / Auxiliary) and retention (analytics retention up to 2 years, total retention up to 12 years).
- Understand how Azure Monitor Agent (AMA) + Data Collection Rule (DCR) + DCR association (DCRA) fit together, and how the DINE policies that ALZ assigns on
platformandlandingzones, such asDeploy-VM-MonitoringandDeploy-VM-ChangeTrack, use one shared user-assigned managed identity to onboard AMA at scale. Know the retirement status of the legacy MMA agent. - Read the structure of Azure Monitor Baseline Alerts (AMBA): the
platform/ambaarchitecture, theDeploy-AMBA-*policy sets assigned per management group, the notification assets (action groups + alert processing rules), theMonitorDisabletag and bring-your-own notifications. - Map the Microsoft Defender for Cloud plans and secure score to the ALZ assignment
Deploy-MDFC-Config-H224, and know the difference between “library defaults” and “accelerator defaults”. - Protect workload VMs with Azure Update Manager (periodic assessment + maintenance configurations) and Azure Backup (
Deploy-VM-Backup), and understand the policies and limits behind them. - Set up cost governance: management group and subscription budgets with action groups, tag inheritance in Cost Management, and the roles and lifecycle of the FinOps framework.
- Centralize activity logs, resource diagnostic logs and platform audit in the management subscription. Cover the difference between subscription-level and management-group-level diagnostic settings,
Deploy-AzActivity-LogandDeploy-Diag-LogsCat, and use KQL to answer “who changed what, and when”.
1-hour timetable
| # | Time | Module | Core content | Animation / interaction | Lab (sandbox tenant) |
|---|---|---|---|---|---|
| 0 | Before class | Setup: management subscription and Log Analytics starting point | Subscription mapping, variables, resource providers, single-subscription fallback, costs | Self-check list | Create rg-alz-mgmt-cc |
| 1 | 00–06 | Central logging: workspace design | One-workspace principle, split criteria, access mode and control mode, table-level / granular RBAC, table plans, retention, cost | “Who can see which logs” access checker | Create law-alz-mgmt-cc and set table-level retention |
| 2 | 06–13 | Policy-driven deployment of AMA and DCR | AMA, DCR, DCRA, UAMI, DINE policies such as Deploy-VM-Monitoring, MMA retirement | Core animation: a new VM is taken over by the platform automatically | DCR + remediation task onboarding one VM |
| 3 | 13–21 | Azure Monitor Baseline Alerts | AMBA architecture, Deploy-AMBA-*, notification assets, alert processing rules, MonitorDisable | Core animation: signal → alert → action group | Action group + alert processing rule + one metric alert |
| 4 | 21–28 | Defender for Cloud | CSPM and workload protection plans, secure score, Deploy-MDFC-Config-H224, continuous export | Secure score calculator | Review plans and secure score |
| 5 | 28–35 | Update Manager and backup | Periodic assessment, maintenance configurations, customer-managed schedules, Deploy-VM-Backup, Recovery Services vault | Maintenance window timeline simulator | Maintenance configuration + backup protected item check |
| 6 | 35–42 | Cost management and FinOps | Budget scope and notifications, action groups, tag inheritance, cost allocation, FinOps roles and lifecycle | Budget alert simulator | Subscription budget + action group |
| 7 | 42–50 | Activity log, diagnostic settings and platform audit | Activity log retained for 90 days, subscription and management-group diagnostic settings, Deploy-AzActivity-Log, Deploy-Diag-LogsCat, audit KQL | Diagnostic settings coverage and duplicate checker | Export the activity log and query “who deleted the resource” |
| 8 | 50–60 | Management review and common errors | Review checklist, ten common errors, interactive troubleshooting tree | Review scorer + troubleshooting tree | One end-to-end management review |
| — | After class | Cheat sheet · Capstone lab | Deliver an operations baseline for the corp Landing Zone of myapp that is observable, alertable, recoverable and auditable | Final quiz (12 questions) | Capstone lab |
Knowledge Coverage Matrix
| Target skill | M1 | M2 | M3 | M4 | M5 | M6 | M7 | M8 | Key commands / resources | Lab |
|---|---|---|---|---|---|---|---|---|---|---|
| Log Analytics workspace design and access control | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | ✓ | az monitor log-analytics workspace | Workspace + table retention |
| AMA / DCR / DCRA and DINE deployment | · | ✓ | ✓ | ✓ | ✓ | · | · | ✓ | az monitor data-collection rule | Remediation task onboarding a VM |
| Alerts, action groups and AMBA | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | az monitor action-group, alert-processing-rule | Alert path |
| Defender for Cloud and secure score | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | ✓ | az security pricing, secure-scores | Plan checklist |
| Patching and backup | · | ✓ | ✓ | · | ✓ | ✓ | · | ✓ | az maintenance, az backup | Maintenance configuration |
| Budgets, tags and FinOps | ✓ | · | · | ✓ | ✓ | ✓ | · | ✓ | az consumption budget | Subscription budget |
| Activity log, diagnostic settings and audit | ✓ | · | ✓ | ✓ | · | · | ✓ | ✓ | az monitor diagnostic-settings subscription | Audit KQL |
| Management plane troubleshooting | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | az policy state, Heartbeat query | Troubleshooting tree |
What this hour leaves out (and where to learn it)
| Topic | Why it is not in this hour | Where to learn it |
|---|---|---|
| Management group hierarchy, full ALZ default policy assignment table | Covered in hour 1; this hour uses only the management-related assignments | Hour 1 Module 5 |
| DINE evaluation timing, remediation tasks, managed identity authorization, exemptions | A topic from hour 2; this hour uses it directly | Hour 2 Module 4 · Module 5 |
| Naming and tagging standards, tag inheritance with Modify | Covered in hour 2; this hour covers only the cost-side usage | Hour 2 Module 2 |
| Custom roles such as Security-Operations, PIM | Belongs to identity design | Hour 3 Module 3 · Module 4 |
| Azure Firewall logs, VNet flow logs, retirement of NSG flow logs | The networking hour covered the data sources; this hour covers only landing the data in the workspace | Hour 4 Module 8 |
Deploy the management landing zone (avm-ptn-alz-management) and pipelines with the IaC Accelerator | Belongs to automation | Hour 6 Automation |
| Microsoft Sentinel detection rules, SOAR, UEBA | Belongs to security operations (SOC) and is beyond the ALZ platform scope | Microsoft Sentinel documentation |
| Prometheus, Grafana, container monitoring | Workload-level monitoring | Prometheus & Grafana 8 hours · AKS 8 hours |
How to use this course
Theory · diagrams · animation · commands · lab · production case · troubleshooting · quiz · voice · video. The animations in Module 2 (a new VM taken over automatically) and Module 3 (the alert path) are the core of this hour.
A module counts toward your progress when you score ≥ 70% on its quiz or click “Mark this module complete”. Progress is stored in this browser's localStorage (it is cleared on refresh if local storage is disabled).
The “Voice” tab reads the narration script aloud with the browser's built-in Web Speech API (en-US). If the browser has no English voice pack, the narration script can still be read or passed to a TTS tool.
AzureActivity and the Usage table have no ingestion charge). Defender for Cloud paid plans are charged per protected resource (Foundational CSPM is free). Azure Backup is charged per protected instance and storage. Update Manager has no extra charge for Azure VMs, but it is charged for Arc servers (check the pricing page). Lab defaults: set a daily cap on the workspace, enable AMA on only one B-series test VM, keep Defender paid plans read-only (or enable them and disable them the same day), and when the backup is done, stop protection and delete the data. For amounts, use the Azure pricing calculator.platform/alz/2026.11.0 (including platform/amba), and Azure/avm-ptn-alz-management/azurerm 0.10.0. Management group IDs use the ALZ defaults (alz → platform → management …; alz → landingzones → corp / online / local), consistent with hour 1. None of the cloud commands were run in a real tenant; the output is illustrative.Module 0 · Setup: management subscription and Log Analytics starting point (complete before class)
management management group, set shared variables, register resource providers, and prepare a test VM that policy can take over- A dedicated sandbox Entra tenant with the ALZ default management group hierarchy (hour 1):
alz,platform,management,landingzones,corp, and so on. - Ideal subscriptions:
sub-alz-management(under themanagementmanagement group, hosting the workspace, DCRs, managed identity and the AMBA resource group) andsub-lz-corp-myapp(undercorp, hosting the test VM). - Permissions: on the
alzmanagement group, Owner (to assign DINE policies and authorize the managed identity, which requires writing role assignments); or Resource Policy Contributor + User Access Administrator. - Local machine: Azure CLI 2.76 or later (the recommended version after the MFA phase 2 enforcement; see Hour 3). The commands will prompt you to install the extensions
monitor-control-service,alertsmanagement,maintenanceandresource-graph.
Links to the previous hours
| From | This hour reuses | What if I do not have it |
|---|---|---|
| Hour 1 | Management group hierarchy; Deploy-AzActivity-Log, Deploy-Diag-LogsCat and Deploy-MDFC-Config-H224 on alz; VM monitoring DINE policies on platform / landingzones | Create only alz, platform, management, landingzones and corp manually; Module 2 uses “assign one built-in policy set separately” instead |
| Hour 2 | Remediation tasks (az policy remediation create), DINE managed identity authorization, evaluationDelay | The command pages in Module 2 give the full commands |
| Hour 3 | Security-Operations custom role, RBAC for the operations group | Using a subscription Owner directly for the lab |
| Hour 4 | vnet-spoke-myapp-cc and the test VM vm-myapp-test without a public IP | Step 3: create a minimal VM |
Step 1: set shared variables
# Subscriptions (replace with your own subscription IDs) SUB_MGMT=<management-subscription-id> SUB_APP=<corp-landing-zone-subscription-id> LOC=canadacentral # Resource groups and resource names (CAF abbreviation + workload + region abbreviation cc) RG_MGMT=rg-alz-mgmt-cc LAW=law-alz-mgmt-cc # The CAF abbreviation is log; this course keeps law (see the naming note in hour 2) UAMI=id-alz-ama-cc # User-assigned managed identity used by AMA DCR_VMI=dcr-vm-insights-cc DCR_CT=dcr-change-tracking-cc RG_AMBA=rg-alz-amba-cc RG_APP=rg-lz-myapp-cc VM=vm-myapp-test TAGS="env=lab owner=platform-team costCenter=cc-1000 workload=alz-management"
Step 2: create resource groups and register resource providers
az account set -s $SUB_MGMT
az group create -n $RG_MGMT -l $LOC --tags $TAGS
for p in Microsoft.OperationalInsights Microsoft.Insights Microsoft.AlertsManagement \
Microsoft.ManagedIdentity Microsoft.Security Microsoft.PolicyInsights; do
az provider register -n $p --wait
done
az account set -s $SUB_APP
for p in Microsoft.Compute Microsoft.Insights Microsoft.RecoveryServices Microsoft.Maintenance \
Microsoft.GuestConfiguration Microsoft.Security; do
az provider register -n $p --wait
done
{
"id": "/subscriptions/<management-subscription-id>/resourceGroups/rg-alz-mgmt-cc",
"location": "canadacentral",
"name": "rg-alz-mgmt-cc",
"properties": { "provisioningState": "Succeeded" },
"tags": { "costCenter": "cc-1000", "env": "lab", "owner": "platform-team", "workload": "alz-management" }
}
Step 3: confirm (or create) the test VM
az account set -s $SUB_APP
az vm show -g $RG_APP -n $VM --query "{name:name, size:hardwareProfile.vmSize, identity:identity.type}" -o table 2>/dev/null || \
az vm create -g $RG_APP -n $VM --image Ubuntu2404 --size Standard_B2ats_v2 \
--vnet-name vnet-spoke-myapp-cc --subnet snet-app --public-ip-address "" --nsg "" \
--admin-username azureuser --generate-ssh-keys --tags $TAGS
Note: Deny-Subnet-Without-Nsg on landingzones and Deny-Public-IP-On-NIC on corp block requests for “a subnet without an NSG” and “a NIC with a public IP” (see Hour 4 Module 7). If you do not have the hour 4 spoke, first create a subnet with an NSG by following the setup page of hour 4.
rg-alz-mgmt-cc, rg-alz-amba-cc and rg-lz-myapp-cc all in the same subscription, and place that subscription under the corp management group. The VM still matches the Deploy-VM-Monitoring, Deploy-VM-Backup and Enable-AUM-CheckUpdates policies inherited from landingzones, so the “automatic takeover” demos in Modules 2 and 5 still work. The only difference is that the workspace and the VM share a subscription, so the effect of “centralized logs across subscriptions” is not visible, and Deploy-AMBA-Management (assigned at the management management group) does not apply to this subscription. Create the alert rules that would live in the management subscription manually in rg-alz-amba-cc in the same subscription.Cost estimate (for completing all the labs)
| Resource | Billing model | Usage in this hour | Estimate |
|---|---|---|---|
| Log Analytics workspace | Per GB ingested; analytics retention within 31 days is included in the ingestion price | VM Insights for 1 VM + activity log (free) + a small amount of diagnostic logs | Usually < US$1/day; set a daily cap of 1 GB |
| Test VM (B2ats_v2, no public IP) | Per hour | About 3 hours | < US$0.10 |
| Alert rules (metric / log search / activity log) | Metric and log alerts are charged per rule / time series; activity log alerts are free | A few rules, a few hours | < US$0.10 |
| Azure Backup (1 VM) | Per protected instance + snapshot / vault storage | 1 day | < US$1 (stop protection and delete the data) |
| Defender for Cloud paid plans | Per resource, per hour | Recommended: keep read-only, do not enable | 0 (Foundational CSPM is free) |
Self-check list
az account management-group subscription show-sub-under-mg --name management -o table az account management-group subscription show-sub-under-mg --name corp -o table
Module 1 · Central logging: Log Analytics workspace design
- State the 10 official criteria for workspace design, and use them to explain why ALZ places one central workspace in the management subscription by default.
- Distinguish the access mode (workspace-context / resource-context) from the access control mode (require workspace permissions / use resource or workspace permissions), and know that granular RBAC (table-level and row-level) is the current recommended approach.
- Understand the three table plans (Analytics, Basic, Auxiliary), how analytics retention (up to 2 years) relates to total retention (up to 12 years), and how each is billed.
- Control costs with daily caps, commitment tiers, table plans and DCR transformations, and avoid the trap where enabling Sentinel makes the whole workspace billed at Sentinel rates.
management management group and Deploy-AzActivity-Log from hour 1; KQL basics. Importance: ★★★★★ (once a workspace is referenced by dozens of policies, moving it is expensive)What: what a Log Analytics workspace is
A workspace is the data store for Azure Monitor Logs. It contains tables such as Heartbeat, Perf, InsightsMetrics, AzureActivity, AzureDiagnostics and the dedicated tables for each resource type. In ALZ it is where the Single control and management plane principle is implemented: the activity log, resource diagnostic logs, AMA data from VMs, Defender for Cloud exports and AMBA log search alerts all converge here. Five ALZ library assignments, Deploy-AzActivity-Log, Deploy-Diag-LogsCat, Deploy-MDFC-Config-H224, Deploy-MDFC-DefSQL-AMA and Deploy-AzSqlDb-Auditing, all point to it through the same default value log_analytics_workspace_id.
Why: the official design principle, start with one workspace
The first sentence of the official documentation (Design a Log Analytics workspace architecture, updated 2026-05) says the design should always start with a single workspace. Add more only when there is a clear reason to split, and use the minimum number that meets the requirements. The data volume alone does not cause performance problems. There are 10 criteria for deciding whether to split:
| Criterion | When you need to split | Common conclusion for the ALZ platform |
|---|---|---|
| Operations data and security data | The security team requires separation, or Sentinel pricing makes operations data more expensive | The operations workspace is in the management subscription; the Sentinel workspace can go in the security subscription |
| Entra tenant | Multiple tenants: most data sources can only write to a workspace in the same tenant | One per tenant (ALZ is also deployed once per tenant) |
| Azure region / data residency | Regulations require data to stay in a geographic region | This course uses only the two Canada regions, so one workspace is enough |
| Data ownership | Subsidiary requires isolation | Split by legal entity |
| Split billing | When cost management or log queries still are not granular enough | First use _ResourceId and _BilledSize to allocate the cost |
| Data retention | Different resources in the same table need different retention periods | Table-level retention is usually enough |
| Commitment tier | A discount tier is reached only after consolidation | Lean towards consolidating |
| Legacy agent limitation | The Linux Log Analytics agent can connect to only one workspace | Retired; no longer a reason once you migrate to AMA |
| Data access control | When resource-context RBAC and table-level RBAC are not enough | Most cases do not need a split |
| Resilience | Key data stays available during a regional outage | Dual-write key data or enable workspace replication |
How: access mode and access control mode
- Access mode is determined by how you open the logs. Opening Logs from Azure Monitor or from the workspace is workspace-context (you see all data from every table you have permission for). Opening them from a resource, a resource group or a subscription is resource-context (you see only records whose
_ResourceIdbelongs to those resources). - Access control mode is a setting on the workspace. “Use resource or workspace permissions” (the default for workspaces created after March 2019; property
enableLogAccessUsingOnlyResourcePermissions = true) lets application teams view logs for their own resources with only read access to those resources, and does not require workspace permissions. “Require workspace permissions” requires everyone to have workspace or table authorization. Note: with the first mode, when you access the data in resource-context, only resource permissions are checked and workspace permissions are ignored. - Granular RBAC is the currently recommended way to control access at table and row level. Give users a role such as Log Analytics Data Reader that includes the
Microsoft.OperationalInsights/workspaces/tables/data/readdata action, then add an ABAC condition on the role assignment to limit it to table names or rows. The older table-level method (workspaces/query/<table name>/read) still works, and the official documentation calls it legacy. Note: granular RBAC is an additive model. If the same scope also has a role such as*/read, the condition has no effect. To enforce the condition in resource-context too, the workspace must be set to “Require workspace permissions”; otherwise, resource read permission exposes all logs for that resource. There is also a protected tables feature in preview (protectionLevel = Protected, deny by default). - Limitation: Basic and Auxiliary tables do not support resource-context queries and must be scoped to the workspace.
Table plans and retention
| Capability | Analytics | Basic | Auxiliary / Lake |
|---|---|---|---|
| Suitable for | Continuous monitoring, real-time detection, alerts | Medium-frequency data for troubleshooting and incident response | Low-frequency, verbose data for audit and compliance |
| Ingestion price | Standard | Reduced | Lowest |
| Query | Full KQL, queries are free | Full KQL, billed per query | Full KQL, slower, billed per query |
| Alerts | Supported | Simple log alerts | Not supported |
| Resource-context / Insights | Supported | Not supported | Not supported |
| Retention | Analytics retention defaults to 30 days (90 days for Sentinel and Application Insights), up to 2 years; total retention up to 12 years | Queryable for 30 days; total retention up to 12 years | Queryable for the whole total retention period, up to 12 years |
Retention billing rules: the first 31 days of analytics retention are included in the ingestion price, so reducing analytics retention below 31 days (minimum 4 days) does not save money. The Usage and AzureActivity tables keep data for 90 days by default at no charge, and have no ingestion charge. When you shorten total retention, the system waits 30 days before deleting the data, so you have a chance to change your mind. Data that is beyond analytics retention moves to low-cost long-term retention, and you retrieve it with a search job or restore.
When: ALZ's default approach
- The IaC Accelerator uses
Azure/avm-ptn-alz-management/azurerm(0.10.0, 2026-10-27) to create the workspace in the management subscription: SKUPerGB2018, retention defaults to 30 days, resource-context permissions are allowed by default, and two solution plans, ContainerInsights and VMInsights, are included by default. It also creates three DCRs (change tracking, VM Insights, Defender for SQL) and one user-assigned managed identity for AMA. An associated Automation account is no longer created by default. - In production, operations tables usually have 90 days of analytics retention, and the total retention for audit tables (
AzureActivity, Entra sign-in logs) is set to 1–7 years according to compliance requirements.
- “If you have a lot of data, you must split the workspace to query fast.” The official documentation says data volume is not a performance limit. Splitting should be based on business criteria.
- “Enabling Sentinel in the operations workspace makes no difference.” Once Sentinel is enabled, all data in that workspace is billed at Sentinel rates, so operations data gets more expensive. Consolidation can also help you reach a commitment tier, so do the math.
- “If application teams need to see logs, I have to give them Reader on the workspace.” In “use resource or workspace permissions” mode, Reader on the resource group is enough, and they see only their own resources.
- “Setting retention to 7 days saves money.” Analytics retention under 31 days is already included in the ingestion price.
Architecture diagram: ALZ central workspace and data sources
Retention timeline: the lifecycle of one Analytics table
Interactive checker: who can see which logs
Select the identity, how you open the logs, the workspace's access control mode and the table to query. The checker walks through the rules in the official “Manage access to Log Analytics workspaces” and gives the reason in the terminal. Sample data: the workspace contains records from two resources, the myapp VM and the hub firewall.
Create the central workspace and set access and cost guardrails
az account set -s $SUB_MGMT
az monitor log-analytics workspace create -g $RG_MGMT -n $LAW -l $LOC \
--sku PerGB2018 --retention-time 30 --quota 1 --tags $TAGS
# --quota: daily cap (GB). Always set it in the lab. In production, configure an alert for “daily cap reached”, otherwise data is dropped silently
# Check the access control mode (true = use resource or workspace permissions)
az monitor log-analytics workspace show -g $RG_MGMT -n $LAW \
--query "{id:id, customerId:customerId, sku:sku.name, retention:retentionInDays, resourcePerm:features.enableLogAccessUsingOnlyResourcePermissions, cap:workspaceCapping.dailyQuotaGb}" -o jsonc
{
"cap": 1.0,
"customerId": "0f3c9a2e-0000-0000-0000-5b7d0e1a2c44",
"id": "/subscriptions/<management-subscription-id>/resourceGroups/rg-alz-mgmt-cc/providers/Microsoft.OperationalInsights/workspaces/law-alz-mgmt-cc",
"resourcePerm": true,
"retention": 30,
"sku": "PerGB2018"
}
Table-level retention and table plans
# Operations table: analytics retention 90 days
az monitor log-analytics workspace table update -g $RG_MGMT --workspace-name $LAW \
-n Heartbeat --retention-time 90
# Audit table: 90 days analytics retention + long-term retention, total retention 2 years (CLI limit 2556 days)
az monitor log-analytics workspace table update -g $RG_MGMT --workspace-name $LAW \
-n AzureActivity --retention-time 90 --total-retention-time 730
# Restore inheritance of the workspace defaults: set both to -1
az monitor log-analytics workspace table update -g $RG_MGMT --workspace-name $LAW \
-n Heartbeat --retention-time -1 --total-retention-time -1
# List the plan and retention of all tables
az monitor log-analytics workspace table list -g $RG_MGMT --workspace-name $LAW \
--query "[].{table:name, plan:plan, analytics:retentionInDays, total:totalRetentionInDays}" -o table
Table Plan Analytics Total --------------- --------- ----------- ------- AzureActivity Analytics 90 730 Heartbeat Analytics 90 90 InsightsMetrics Analytics 30 30 Usage Analytics 90 90 ...
Who is spending the money: billable data volume by table and by resource
// Billable GB per table over the last 7 days Usage | where TimeGenerated > ago(7d) and IsBillable == true | summarize GB = sum(Quantity) / 1000 by DataType // Quantity is in MB | sort by GB desc // Allocate by resource group (using the standard columns _BilledSize and _ResourceId) find where TimeGenerated > ago(1d) project _BilledSize, _ResourceId | extend rg = tostring(split(_ResourceId, "/")[4]) | summarize GB = sum(_BilledSize) / 1e9 by rg | sort by GB desc
Granular RBAC: give the auditor read-only access to AzureActivity (illustrative)
LAW_ID=$(az monitor log-analytics workspace show -g $RG_MGMT -n $LAW --query id -o tsv)
az role assignment create --assignee <auditor-group-object-id> \
--role "Log Analytics Data Reader" --scope $LAW_ID \
--condition-version "2.0" \
--condition "((!(ActionMatches{'Microsoft.OperationalInsights/workspaces/tables/data/read'})) OR (@Resource[Microsoft.OperationalInsights/workspaces/tables:name] StringEquals 'AzureActivity'))"
The property names and syntax of the condition follow the official “Granular RBAC in Azure Monitor” documentation. The first time you use it, generate the condition in the portal's condition editor, then copy it into your IaC.
Lab 1: create the central workspace and verify resource-context access (about 15 minutes)
resourcePerm is true and the daily cap is 1 GB.Heartbeat to 90 days, set AzureActivity to 90 days of analytics retention and 730 days of total retention, then verify with table list.rg-lz-myapp-cc, grant Reader only, and give it no permissions on the workspace:
az role assignment create --assignee <app-team-group-object-id> --role Reader \ --scope /subscriptions/$SUB_APP/resourceGroups/$RG_APP
vm-myapp-test → Logs, and run Heartbeat | take 10; records should appear. Then open the workspace from Azure Monitor → Logs, and it should show that you do not have permission. This is “resource-context + use resource or workspace permissions”.Case 1: log bill doubled after enabling Sentinel
Problem: A company enabled Sentinel on the only workspace in the management subscription. At month end they found that VM performance counters and container logs were also billed at Sentinel prices. Approach: they re-evaluated against the official design criteria. The security team required separation, and the operations data was about 60 GB per day while the security data was about 40 GB. They finally created a new Sentinel workspace in the security subscription and directed Defender for Cloud and Entra logs to it. The operations workspace kept VM Insights and diagnostic logs, and ContainerLogV2 was switched to the Basic plan. Lesson: consolidation can help you reach a commitment tier, and splitting isolates Sentinel billing. Do the math for both.
Case 2: a flood of “cannot see logs” tickets from application teams
Problem: The platform team changed the workspace access control mode to “Require workspace permissions” and then granted access only to SREs. As a result, dozens of application teams could not see logs for their own resources. Approach: they restored the default “Use resource or workspace permissions”, so application teams could view logs in resource-context with Reader on their resource group. For sensitive tables such as SecurityEvent, they used granular RBAC or protected tables to control access separately. Lesson: the access control mode is a switch for the whole workspace. Before you change it, list who relies on resource-context access.
Case 3: daily cap made alerts go silent
Problem: An abnormal debug log pushed the workspace to its daily cap. For the next 8 hours, the AMBA heartbeat alert and CPU alert had no data to evaluate. Approach: use the daily cap only to prevent runaway costs, configure an alert for “daily cap reached”, and for verbose logs use a transformation in the DCR to filter them, or move them to a Basic or Auxiliary table. Lesson: the cap is a fuse, not a cost-optimization tool.
Common errors and fixes
When a user opens Logs from a resource, the message “You don't have access to any workspace” appears, or the query returns no results
Cause: the workspace is in “Require workspace permissions” mode, or the _ResourceId of the records is empty (non-Azure machines are not connected through Arc). Diagnosis: az monitor log-analytics workspace show ... --query features.enableLogAccessUsingOnlyResourcePermissions; in workspace-context, query Heartbeat | summarize count() by _ResourceId. Fix: change it back to “Use resource or workspace permissions”; onboard non-Azure servers to Azure Arc first.
Querying a Basic table fails with: the table does not support resource-scoped queries
Cause: Basic and Auxiliary tables can be queried only at workspace scope. Fix: open the logs from the workspace; keep data that must be authorized per resource in Analytics tables.
(InvalidParameter) totalRetentionInDays is out of the allowed range
Cause: the CLI's --total-retention-time allows up to 2,556 days, and the REST range is 4–4,383 days; analytics retention is up to 730 days. Fix: for total retention over 7 years, set it with the portal, REST, or a PowerShell version that supports the value.
Data disappears entirely after a certain time each day, and the Operation table shows “Data collection stopped due to daily limit”
Cause: the daily cap has been reached. Diagnosis: _LogOperation | where Category =~ "Ingestion" | where Detail contains "OverQuota" (the official recommendation is to build a log search alert on this, evaluated every 5 minutes). Fix: find the table that spiked (see the Usage query on the commands page), filter it with a DCR transformation or adjust the cap, and configure an alert for the cap.
You changed the workspace default retention, but one table did not change
Cause: a table with its own retention setting no longer inherits the workspace default. Fix: run table update --retention-time -1 --total-retention-time -1 on that table to restore inheritance.
1. Set the analytics retention of the SecurityEvent table to 180 days and the total retention to 3 years, then confirm the result.
az monitor log-analytics workspace table update -g rg-alz-mgmt-cc --workspace-name law-alz-mgmt-cc \
-n SecurityEvent --retention-time 180 --total-retention-time 1095
az monitor log-analytics workspace table show -g rg-alz-mgmt-cc --workspace-name law-alz-mgmt-cc \
-n SecurityEvent --query "{analytics:retentionInDays,total:totalRetentionInDays,archive:archiveRetentionInDays}"2. Write a KQL query that finds the 5 resources with the largest billable data volume in the past 24 hours.
find where TimeGenerated > ago(24h) project _BilledSize, _ResourceId | summarize GB = sum(_BilledSize) / 1e9 by _ResourceId | top 5 by GB desc
A group has two legal entities, one in Canada and one in the EU. EU data must stay in the EU, and the security team wants a separate Sentinel. Each legal entity produces about 30 GB per day of operations data and about 20 GB per day of security data. How many workspaces would you design?
Split into at least 4 along “data residency × operations / security”: Canada operations, Canada security, EU operations, EU security (if the two entities are in the same tenant). Reasons: EU data residency is a hard requirement; the security team requires separation, and Sentinel would bill the whole workspace at Sentinel rates. Trade-offs: each workspace on its own may not reach a higher commitment tier, and cross-workspace queries need workspace(). You can evaluate a dedicated cluster (≥100 GB/day) to consolidate billing for workspaces in the same region. Application teams still access data through resource-context, so there is no need to split workspaces per application.
Verified teaching videos
Official documentation
- Design a Log Analytics workspace architecture
- Manage access to Log Analytics workspaces
- Manage data retention in a Log Analytics workspace
- Azure Monitor Logs (comparison of table plans)
Video storyboard (about 90 seconds)
This course material cannot directly generate video or MP3 files. A storyboard and narration script are provided, which you can pass to a video tool.
Visual: four data streams (VMs, PaaS, activity log, Defender) flow into one workspace icon in the management subscription.
Narration: ALZ centralizes platform logs in one workspace. The official principle is to start with one, and to split only for a clear reason.
Visual: the same workspace, three people enter from different doors: operations sees everything, the application team sees only rows for its own resources, and the auditor sees only one table, AzureActivity.
Narration: the access mode, the access control mode and granular RBAC determine who can see which rows and which tables.
Visual: three colored table plan bars: Analytics, Basic, Auxiliary. The price tags get smaller in turn, and the query speed icons get slower in turn.
Narration: use Analytics for high-value data, and a lower-cost plan for verbose audit data.
Visual: a timeline: 31 days in green, up to 2 years in blue, up to 12 years in orange.
Narration: retention within 31 days is already included in the ingestion price. Long-term retention is cheap, but you need a search job to retrieve data from it.
Module 2 · Policy-driven deployment of Azure Monitor Agent and DCR
- Explain the relationship between AMA, DCR and DCR association (DCRA): a DCR is control-plane configuration, and telemetry does not flow through the DCR resource.
- List the VM monitoring policies that ALZ assigns on
platformandlandingzones, and the defaults they share (the AMA managed identity, and the three DCRs for VM Insights, change tracking and Defender for SQL). - Understand why ALZ uses one user-assigned managed identity (UAMI) to authenticate AMA on all VMs, and why
DenyAction-DeleteUAMIAMAexists. - Know the retirement status of MMA (the Log Analytics agent) and its migration tools, and use remediation tasks to onboard existing VMs to AMA.
What: AMA, DCR, DCRA
- Azure Monitor Agent (AMA): a VM extension for Windows and Linux (
AzureMonitorWindowsAgent/AzureMonitorLinuxAgent), which can also be installed on Azure Arc servers. After installation, it connects to Azure Monitor, retrieves all DCRs associated with the machine, collects data according to the rules and uploads it. A healthy AMA writes one record per minute to theHeartbeattable. - Data Collection Rule (DCR): an Azure resource that describes “what to collect (data sources), in what shape (streams), how to process it (transformation KQL), and where to send it (destinations)”. The official documentation stresses that a DCR is control-plane configuration, and telemetry does not flow through the DCR resource.
- DCR association (DCRA): connects one resource to one DCR. One DCR can be used by hundreds or thousands of machines through many DCRAs, and one machine can have several DCRs associated (for example, a platform baseline DCR plus a workload DCR). The overall relationship is many-to-many.
Why: why MMA is no longer used
The Log Analytics agent (MMA / OMS) retired on 2024-08-31. The official migration page (updated 2026-10-22) states that after 2026-03-02, data uploads from the legacy agent may stop at any time without further notice. The portal can no longer install the legacy agent, and Microsoft no longer provides support (only the legacy agent connected to a local SCOM is not affected by this retirement). Migration tools: the AMA Migration Helper workbook (inventory), the DCR Config Generator (converts the legacy workspace configuration to DCRs) and the MMA Discovery and Removal tool (bulk uninstall). Services that depended on the legacy agent each have a successor: Automation Update Management → Azure Update Manager (no AMA needed, see Module 5); change tracking → the AMA-based change tracking DCR; Defender for Servers P2 → agentless scanning.
How: ALZ uses policy to install AMA on every machine
| Assignment name (library 2026.11.0) | Management group | Built-in policy set | What it does |
|---|---|---|---|
Deploy-VM-Monitoring | platform, landingzones | Enable Azure Monitor for VMs (924bfe3a-…) | Attaches the shared UAMI to the VM, installs AMA, and creates a DCRA to the VM Insights DCR |
Deploy-VMSS-Monitoring / Deploy-vmHybr-Monitoring | Same as above | Policy sets for VMSS / Arc | Same as above, applied to scale sets and Arc servers |
Deploy-VM-ChangeTrack (and the VMSS / Arc versions) | Same as above | Enable ChangeTracking and Inventory for virtual machines (92a36f05-…) | Change tracking extension + DCRA to the change tracking DCR |
Deploy-MDFC-DefSQL-AMA | Same as above | Enable Defender for SQL on SQL VMs and Arc-enabled SQL Servers | Defender for SQL collection for SQL VMs (Defender for SQL DCR) |
Enable-AUM-CheckUpdates | Same as above | Custom policy set Deploy-AUM-CheckUpdates | Modify: sets the patch assessment mode to AutomaticByPlatform (Module 5) |
DenyAction-DeleteUAMIAMA | platform | DenyAction-DeleteResources | Prevents deletion of the UAMI used by AMA (Hour 2) |
The parameters of these assignments all come from the library's default values file alz_policy_default_values.json: ama_user_assigned_managed_identity_id (shared by the 5 assignments), ama_vm_insights_data_collection_rule_id, ama_change_tracking_data_collection_rule_id, ama_mdfc_sql_data_collection_rule_id. The assignment parameters fix bringYourOwnUserAssignedManagedIdentity = true and restrictBringYourOwnUserAssignedIdentityToSubscription = false. In other words, the UAMI can sit in another subscription (management) and be shared by the VMs in all landing zones.
Why one shared UAMI
- AMA needs a managed identity to authenticate to Azure Monitor. A system-assigned identity means one identity per VM. With one UAMI, the number of identities and the permission surface are controllable, and they do not change when a VM is rebuilt.
- The trade-off: this UAMI becomes a critical dependency. If it is accidentally deleted, uploads from all VMs stop, so ALZ protects it on
platformwith a DenyAction. - Cross-subscription permissions: when a policy assignment's managed identity attaches the UAMI to a VM, it needs
Microsoft.ManagedIdentity/userAssignedIdentities/assign/actionon the UAMI (Managed Identity Operator). It also needs to be able to write DCRAs (permission on the DCR). The policy definition uses the parameter metadataassignPermissionsto declare that “the resource referenced by this parameter also needs authorization”. The portal and thealzprovider (override_policy_definition_parameter_assign_permissions_setinavm-ptn-alz) use this to create role assignments automatically on the UAMI, the DCR and the workspace. With pure CLI deployments, you must add them yourself.
When: new VMs and existing VMs
- New or updated VMs: after the resource provider returns success, the policy engine evaluates the existence condition after the DINE
evaluationDelay(default PT10M, see Hour 2). If the condition is not met, it deploys a template using the assignment's managed identity. - Existing VMs (a subscription that has just moved into
landingzones, or an assignment that was just created): they only show as non-compliant, and a remediation task is required to fill them in. - The AMBA VM alerts are log search alerts based on
InsightsMetricsandHeartbeat(Module 3), so whether the VM Insights DCR is associated directly determines whether the alerts have data.
- “A DCR is like a pipe that data flows through.” A DCR is only configuration. The agent sends data directly to the Azure Monitor ingestion endpoint, and then it is transformed and routed according to the DCR.
- “If you assign Deploy-VM-Monitoring, existing VMs will automatically get AMA.” Existing resources need a remediation task.
- “A system-assigned identity on each VM is more secure.” ALZ chose a shared UAMI for scale and control. The security focus is on protecting the UAMI and on least privilege.
- “MMA still works, so I'll migrate when it breaks.” After 2026-03-02, uploads from the legacy agent may stop at any time.
Component relationships: one UAMI, three DCRs, hundreds or thousands of DCRAs
Data flow: one performance counter from a VM to the workspace
Core animation: a new VM from creation to being taken over by the platform automatically
Select the VM's management group and a few “fault switches”, then play through the steps. Each step corresponds to real ARM / Azure Policy behavior. The times are illustrative (the DINE default evaluationDelay is 10 minutes, and compliance results become visible about 15 minutes later).
Create the shared UAMI and two DCRs (a one-time platform team task)
az account set -s $SUB_MGMT
az identity create -g $RG_MGMT -n $UAMI -l $LOC --tags $TAGS
UAMI_ID=$(az identity show -g $RG_MGMT -n $UAMI --query id -o tsv)
LAW_ID=$(az monitor log-analytics workspace show -g $RG_MGMT -n $LAW --query id -o tsv)
# VM Insights-style DCR: performance counters → InsightsMetrics (simplified example; in production, generate it with the VM Insights experience or an AVM module)
cat > dcr-vmi.json <<EOF
{
"location": "$LOC",
"properties": {
"description": "VM Insights baseline for all landing zones",
"dataSources": {
"performanceCounters": [{
"name": "VMInsightsPerfCounters",
"streams": ["Microsoft-InsightsMetrics"],
"samplingFrequencyInSeconds": 60,
"counterSpecifiers": ["\\\\VmInsights\\\\DetailedMetrics"]
}]
},
"destinations": { "logAnalytics": [{ "name": "law", "workspaceResourceId": "$LAW_ID" }] },
"dataFlows": [{ "streams": ["Microsoft-InsightsMetrics"], "destinations": ["law"] }]
}
}
EOF
az monitor data-collection rule create -g $RG_MGMT -n $DCR_VMI --rule-file dcr-vmi.json
DCR_VMI_ID=$(az monitor data-collection rule show -g $RG_MGMT -n $DCR_VMI --query id -o tsv)
Without a policy: manually onboard one VM (to understand the three items)
az account set -s $SUB_APP
VM_ID=$(az vm show -g $RG_APP -n $VM --query id -o tsv)
# 1) Attach the UAMI
az vm identity assign -g $RG_APP -n $VM --identities $UAMI_ID
# 2) Install AMA and tell it which UAMI to authenticate with
az vm extension set -g $RG_APP --vm-name $VM -n AzureMonitorLinuxAgent \
--publisher Microsoft.Azure.Monitor --enable-auto-upgrade true \
--settings "{\"authentication\":{\"managedIdentity\":{\"identifier-name\":\"mi_res_id\",\"identifier-value\":\"$UAMI_ID\"}}}"
# 3) DCRA: associate the VM with the DCR
az monitor data-collection rule association create --name dcra-vmi \
--resource $VM_ID --rule-id $DCR_VMI_ID
az monitor data-collection rule association list --resource $VM_ID -o table
Name ProvisioningState DataCollectionRuleId -------- ------------------- ------------------------------------------------------------------ dcra-vmi Succeeded /subscriptions/<management-subscription-id>/resourceGroups/rg-alz-mgmt-cc/providers/Microsoft.Insights/dataCollectionRules/dcr-vm-insights-cc
ALZ approach: check the assignment and trigger a remediation task
# VM monitoring assignment on landingzones and its parameters
az policy assignment show --name Deploy-VM-Monitoring \
--scope /providers/Microsoft.Management/managementGroups/landingzones \
--query "{effect:enforcementMode, identity:identity.type, dcr:parameters.dcrResourceId.value, uami:parameters.userAssignedIdentityResourceId.value}"
# Existing VMs need a remediation task (the policy set has to be remediated reference by reference; list the reference IDs first)
az policy set-definition show --name 924bfe3a-762f-40e7-86dd-5c8b95eb09e6 \
--query "policyDefinitions[].policyDefinitionReferenceId" -o tsv
az policy remediation create --name rem-vmi-ama \
--management-group landingzones \
--policy-assignment /providers/Microsoft.Management/managementGroups/landingzones/providers/Microsoft.Authorization/policyAssignments/Deploy-VM-Monitoring \
--definition-reference-id <reference-id-for-AMA-on-Linux> --resource-discovery-mode ReEvaluateCompliance
Verify: is the agent checking in?
Heartbeat | where TimeGenerated > ago(15m) | summarize LastSeen = max(TimeGenerated) by Computer, Category, _ResourceId | order by LastSeen desc // A Category of "Azure Monitor Agent" means the record came from AMA; "Direct Agent" means the legacy MMA
Computer Category LastSeen _ResourceId -------------- ------------------- ---------------------------- ---------------------------------------------- vm-myapp-test Azure Monitor Agent 2026-11-18T14:21:03Z /subscriptions/…/virtualmachines/vm-myapp-test
Lab 2: have the policy connect the test VM to AMA (about 25 minutes, including waiting)
id-alz-ama-cc and dcr-vm-insights-cc.Deploy-VM-Monitoring on landingzones should already point to these two resources. If you built the hierarchy manually, assign the built-in policy set “Enable Azure Monitor for VMs” on landingzones, fill in dcrResourceId, bringYourOwnUserAssignedManagedIdentity=true, and userAssignedIdentityResourceId, and use a system-assigned managed identity (region canadacentral).roleDefinitionIds in the definition, on landingzones. Also, on id-alz-ama-cc, grant Managed Identity Operator; on the DCR, grant Monitoring Contributor:
PRINCIPAL=$(az policy assignment show --name Deploy-VM-Monitoring \ --scope /providers/Microsoft.Management/managementGroups/landingzones --query identity.principalId -o tsv) az role assignment create --assignee-object-id $PRINCIPAL --assignee-principal-type ServicePrincipal \ --role "Managed Identity Operator" --scope $UAMI_ID az role assignment create --assignee-object-id $PRINCIPAL --assignee-principal-type ServicePrincipal \ --role "Monitoring Contributor" --scope $DCR_VMI_ID
az policy state trigger-scan -g $RG_APP and then remediate.id-alz-ama-cc, the extension list includes AzureMonitorLinuxAgent, and the DCR association list has one entry pointing to dcr-vm-insights-cc. In the workspace, the Heartbeat table shows records where Category == "Azure Monitor Agent".Case 1: None of the 300 existing VMs moved into landingzones has AMA installed
Problem: One week after the subscription moved from the old hierarchy to corp, the compliance report showed 300 VMs as noncompliant, yet no deployment had run. Cause: DINE does not automatically remediate existing resources. Fix: Create remediation tasks in batches by the policy set's reference ID (resourceCount up to 500 per batch, parallelDeployments default 10), Linux first, then Windows. Before remediating, confirm that the assignment's managed identity has permissions on the UAMI and the DCR in the management subscription. Lesson: The subscription migration checklist should include a "remediation task" step (hour 7 covers the migration order in detail).
Case 2: Someone deleted the UAMI, and all VM heartbeats stopped at once
Problem: An early deployment lacked DenyAction-DeleteUAMIAMA, and a cleanup script deleted a UAMI that looked unused. Impact: AMA could not get tokens, so uploads from all VMs stopped, and AMBA's heartbeat alerts fired hundreds of times at once. Fix: Recreating a UAMI with the same name does not restore access, because the object ID changes. Rerun the remediation tasks to attach the new UAMI to all VMs, then add the missing DenyAction assignment. Lesson: Protect key shared identities with DenyAction or resource locks, and set up an aggregate alert for an overall drop in heartbeats.
Case 3: A change to one DCR counter doubled the cost
Problem: Someone changed the sampling interval in a shared DCR from 60 seconds to 10 seconds and added all Windows events. The DCR is associated with 2,000 machines, so the next day data volume in the Perf and Event tables surged. Fix: Keep only the platform baseline in the shared DCR, and route changes through PR approval. Put extra workload requirements in a separate DCR and associate it only with the relevant machines. Use DCR transformations to filter out columns you don't need. Lesson: Before you change a shared DCR, check how many DCRAs it has.
Common errors and fixes
Remediation task fails: LinkedAuthorizationFailed … does not have permission to perform action 'Microsoft.ManagedIdentity/userAssignedIdentities/assign/action' (the exact error text may differ)
Cause: The assignment's managed identity can write to the VM, but it has no assign permission on the UAMI in another subscription. Diagnosis: Remediation task details → failed deployment → error message; az role assignment list --assignee <principalId> --all. Fix: Grant Managed Identity Operator on the UAMI. If you use IaC, confirm that the assignPermissions metadata on the parameter is recognized.
The AMA extension status is Succeeded, but the workspace has no data at all
Cause: There is no DCRA; or the DCR destination points to a different workspace; or the private network is missing name resolution for the ingestion endpoints (AMPLS / private DNS). Diagnosis: az monitor data-collection rule association list --resource <vmId>; on the VM, check /var/opt/microsoft/azuremonitoragent/log/mdsd.err. Fix: Add the missing DCRA; check the DCR's destinations; in private environments, configure private DNS as covered in the networking course.
The same VM's data appears twice in the workspace
Cause: MMA and AMA are both running and both sending; or two DCRs collect the same counter into the same workspace. Diagnosis: Heartbeat | summarize by Computer, Category shows both Direct Agent and Azure Monitor Agent. Fix: After verifying AMA, remove the old agent's workspace configuration and uninstall MMA; merge duplicate data sources.
(RequestDisallowedByPolicy) Deleting id-alz-ama-cc was denied; the policy is DenyAction-DeleteUAMIAMA
Cause: This is by design. Fix: If you really need to replace the UAMI, first update the default values and all assignment parameters, run the remediation, and then create an exemption on the resource before deleting it (see Hour 2 exemptions).
The new VM has been running for 30 minutes and still has no AMA
Cause: The VM is in sandbox or another management group that does not have this assignment; or the assignment is DoNotEnforce; or evaluation is still in progress. Diagnosis: az policy state list --resource <vmId> --query "[].{a:policyAssignmentName,c:complianceState}" -o table. Fix: Check the management group placement and enforcementMode; if needed, run trigger-scan and then remediate manually.
1. List the resources associated with dcr-vm-insights-cc.
# REST: Data Collection Rule Associations - List By Rule DCR_ID=$(az monitor data-collection rule show -g rg-alz-mgmt-cc -n dcr-vm-insights-cc --query id -o tsv) az rest --method get --url "https://management.azure.com$DCR_ID/associations?api-version=2022-06-01" \ --query "value[].id" -o tsv | sed 's#/providers/Microsoft.Insights/dataCollectionRuleAssociations/.*##'
2. Use Resource Graph to find all Linux VMs under landingzones that do not have the AMA extension.
resources
| where type =~ "microsoft.compute/virtualmachines" and properties.storageProfile.osDisk.osType =~ "Linux"
| join kind=leftouter (
resources | where type =~ "microsoft.compute/virtualmachines/extensions" and name =~ "AzureMonitorLinuxAgent"
| extend vmId = tolower(substring(id, 0, indexof(id, "/extensions/"))) | project vmId, ama = 1
) on $left.id == $right.vmId
| where isnull(ama)
| project name, resourceGroup, subscriptionIdRun it with az graph query -q "…" --management-groups landingzones. You may need tolower(id) to normalize the casing of the join key.
The security team requires that security events from all Windows VMs go to the Sentinel workspace in the security subscription, while the operations team wants only performance data sent to the management workspace. How do you do this the ALZ way, without changing the platform baseline DCR?
Create a second DCR, a "security events DCR" (Windows event stream → Sentinel workspace), in the security subscription. Use an extra policy assignment on landingzones (a built-in policy of the type “Configure Windows machines to be associated with a Data Collection Rule”, or a custom DINE) to create a second DCRA for Windows VMs. AMA supports associating one machine with multiple DCRs and sending data to multiple workspaces, and the platform baseline DCR stays unchanged. Note: Do not collect the same event into the same workspace from two DCRs. Access to the Sentinel workspace is managed by the security team.
Verified training videos
Official documentation
- Data collection rules in Azure Monitor
- Log Analytics agent migration
- Use Azure Policy to install and manage the Azure Monitor Agent
- ALZ Library: policy_assignments and alz_policy_default_values.json
Video storyboard script (about 90 seconds)
This courseware cannot generate a video or MP3 directly. A storyboard and narration script are provided for you to hand to a video tool.
Visual: The application team clicks “Create VM,” and the VM appears under the corp management group, with a timer starting beside it.
Narration: The application team only creates the virtual machine. The platform fills in the monitoring.
Visual: Policy icons light up in turn: an identity badge is attached, the agent extension is installed, and a dashed line connects to the DCR.
Narration: Deploy policies check three things: identity, agent, and association. Whatever is missing, they add.
Visual: The VM sends heartbeat dots through the ingestion endpoint into the workspace table. The DCR icon glows on the side, but the data does not pass through it.
Narration: A data collection rule is only configuration. The data goes straight to the ingestion endpoint.
Visual: A hand tries to delete the managed identity and is blocked by a red shield.
Narration: The shared identity is a critical dependency, so the platform protects it with a deny-action policy.
Module 3 · Azure Monitor Baseline Alerts (AMBA)
- Explain the full path of one alert: signal → alert rule evaluation → fired alert → alert processing rule → action group → notification / automation, and how "Resolved" is produced.
- Understand how the AMBA-ALZ pattern is structured in the ALZ Library: the
ambaarchitecture is layered onto the existing management group hierarchy, and it lists whichDeploy-AMBA-*policy sets are assigned to each management group. - Know the notification assets for AMBA (one
ag-AMBA-…action group and oneapr-AMBA-…alert processing rule per subscription), and how theMonitorDisabletag and BYO notifications work. - Recognize where AMBA overlaps with ALZ's own
Deploy-SvcHealth-BuiltIn, and the VM log alerts' dependency on VM Insights data.
What: The four parts of an Azure Monitor alert
| Part | Resource type | Role | Key points |
|---|---|---|---|
| Alert rule | metricAlerts / scheduledQueryRules / activityLogAlerts | Evaluates a signal on a schedule; when the condition is met, it creates a "Fired" alert | Metric alerts check platform metrics; log search alerts run KQL; activity log alerts match events (including service health and resource health) |
| Alert (instance) | Records in Alerts Management | Severity Sev0–Sev4, monitor condition Fired / Resolved | Stateful alerts resolve automatically once the condition clears (autoMitigate) |
| Alert processing rule | Microsoft.AlertsManagement/actionRules (formerly action rules) | Add action groups to fired alerts, or suppress all action groups | Suppression takes precedence over adding; it applies only within the same subscription; it takes effect up to 30 minutes after creation; it does not affect service health alerts |
| Action group | Microsoft.Insights/actionGroups | Notifications (email, SMS, push, voice, ARM role) and actions (webhook, Logic App, Function, Event Hub, Automation runbook, ITSM) | Can be referenced directly by a rule, or added by an alert processing rule |
Why: why you need a "baseline"
Without a baseline, each application team decides for itself whether to alert, what thresholds to use, and who to notify. The result: platform components (firewalls, gateways, Key Vault, storage) have no one watching them, or the same problem triggers alerts from ten teams. AMBA (Azure Monitor Baseline Alerts) is a set of recommended alerts with recommended thresholds, maintained by Microsoft. The AMBA-ALZ pattern packages them as Azure Policy: once a subscription is placed under a management group, DINE policies automatically deploy the matching alert rules and notification assets in that subscription.
How: how AMBA is structured in the ALZ Library
The platform/amba folder in the ALZ Library (latest release platform/amba/2026.10.0, 2026-10-20) contains 143 policy definitions and 16 policy sets. Its architecture definition, amba, marks all 6 management groups as exists: true. In other words, it is layered onto the existing ALZ hierarchy and does not create new management groups:
| Management group | AMBA assignments | What it covers |
|---|---|---|
alz (intermediate root) | Deploy-AMBA-Notification, Deploy-AMBA-Res-SvcHlth | Notification assets for each subscription; service health and resource health alerts |
platform | Deploy-AMBA-VM, Deploy-AMBA-VMSS, Deploy-AMBA-HybridVM | Platform VMs (such as jump boxes and DNS servers) |
management | Deploy-AMBA-Management | Workspace deletion / key regeneration, daily cap reached, automation jobs, Recovery Services vault health, storage availability |
connectivity | Deploy-AMBA-Connectivity, Deploy-AMBAConnectivity2 | Firewall health and SNAT, VPN / ExpressRoute gateways and circuits, DDoS on public IPs, private DNS zone capacity, load balancers, NSG / UDR changes; policy set 2 covers P2S gateways and Virtual WAN hubs |
identity | Deploy-AMBA-Identity | Key Vault and Managed HSM availability, latency, capacity, and deletion |
landingzones | Deploy-AMBA-VM / VMSS / HybridVM, KeyMgmt, LoadBalance, NetworkChang, RecoverySvc, Storage, Web | Common workload resources |
Default parameters in the library (override these at deployment): the alert resource group rg-amba-alz-prod-001 (the default inside the definition is rg-amba-monitoring-001, with a location placeholder of eastus; this hour uses rg-alz-amba-cc / canadacentral instead); the disable tag MonitorDisable, with the values true, Test, Dev, and Sandbox; the notification asset suffix -ALZ-001; the alert description prefix AMBA-ALZ:; and the VM log alerts use a user-assigned managed identity named id-amba-alz-arg-reader-prod-001, because the KQL in these alerts calls arg("") to query Azure Resource Graph and filter out VMs tagged MonitorDisable.
What the VM alerts look like (default values defined in the library)
| Alert | Type | Data source | Default threshold | Severity | Frequency / window |
|---|---|---|---|---|---|
| VM heartbeat | Log search alert (one per subscription) | Heartbeat | No heartbeat for more than 10 minutes | Sev1 | PT5M / PT6H |
| VM CPU | Log search alert (one per subscription) | InsightsMetrics (Origin vm.azm.ms, Processor / UtilizationPercentage) | > 85% | Sev2 | PT5M / PT15M |
Key dependency: The AMBA documentation explicitly requires that VM log alerts need VM Insights performance collection. Without the DCRA from Module 2, the CPU, memory, and disk alerts will never fire. Also, alert rules are deployed per subscription and use KQL to cover all VMs in the subscription at once, so new VMs do not need new rules.
Notification assets and "bring your own notifications"
Deploy-AMBA-Notification(policy set Notification-Assets 1.6.0) contains two definitions:Deploy_AlertProcessing_Ruledeploys the action groupag-AMBA-…and the alert processing ruleapr-AMBA-…into each subscription's alert resource group (the rule adds the action group to AMBA alerts);Deploy_Suppression_AlertProcessing_Ruledeploys a suppression rule.- The recipients come from parameters:
ALZMonitorActionGroupEmail,ALZWebhookServiceUri,ALZLogicappResourceId,ALZFunctionResourceId,ALZEventHubResourceId, andALZArmRoleId(notify by role). - BYO notifications: If you already have a central action group or alert processing rule, use the
BYOActionGroupandBYOAlertProcessingRuleparameters to reuse them instead of creating new ones in each subscription. includeAlzAlertsOnlycontrols whether the alert processing rule applies only to AMBA alerts or to all alerts in the subscription.
When: how it relates to ALZ's built-in service health alerts
ALZ itself assigns Deploy-SvcHealth-BuiltIn on alz (built-in policy 98903777-…). It creates activity log alerts in rg-serviceHealthAlert covering Service Issues, Planned Maintenance, Health Advisories, and Security Advisories. It can create a new action group, ag-ServiceHealthAlertActionGroup, and by default notifies the subscription's Owner role. When you also deploy AMBA's Deploy-AMBA-Res-SvcHlth, plan ahead to avoid sending two notifications for the same event (the AMBA documentation has a dedicated page, "Adopt the new built-in Azure Service Health policy").
Deployment options: the AMBA portal accelerator, GitHub Actions, Azure Pipelines, Azure CLI / PowerShell, or the Terraform module. Or add platform/amba to library_references in the alz provider, so it is managed together with ALZ by avm-ptn-alz (hour 6). The deployment identity needs permission to create policies and role assignments on the intermediate root: Owner, or the minimum combination listed in the documentation (Managed Identity Contributor, Monitoring Policy Contributor, and User Access Administrator with conditions). Do not assign policies at the tenant root group.
- “Deploying AMBA means the VM CPU alert now works.” It also needs VM Insights data; a VM without a DCRA will never fire.
- “Suppressing with an alert processing rule means no alert is generated.” The alert still fires and is visible in the portal; only the action groups are not called. Nothing is sent later once maintenance ends.
- “An alert processing rule can add notifications to service health alerts across the board.” The documentation states clearly that it does not affect service health alerts; for those, reference the action group directly in the rule.
- “Setting MonitorDisable=Dev on the dev subscription only turns off alerts for dev VMs.” When this tag is set on a subscription, the whole subscription leaves AMBA's compliance and deployment scope, including subscription-level activity log and service health alerts.
Architecture diagram: AMBA policies sit on management groups, and the assets live in each subscription
Timeline: the life cycle of one CPU alert
Core animation: from signal to action group
Choose a signal type and a condition, then step through how the alert is evaluated, fired, processed, and notified. Rule parameters come from the default values defined in the AMBA library; latencies are illustrative.
Platform notification assets: action group + alert processing rule
az extension add --name alertsmanagement az account set -s $SUB_APP az group create -n $RG_AMBA -l $LOC --tags $TAGS az monitor action-group create -g $RG_AMBA -n ag-alz-ops-cc --short-name alzops \ --action email platform-oncall oncall@contoso.example \ --action webhook itsm https://itsm.contoso.example/hooks/azure usecommonalertschema AG_ID=$(az monitor action-group show -g $RG_AMBA -n ag-alz-ops-cc --query id -o tsv) # Add the action group to all Sev0–Sev2 alerts in this subscription az monitor alert-processing-rule create -g $RG_AMBA -n apr-alz-ops-cc \ --rule-type AddActionGroups --action-groups $AG_ID \ --scopes /subscriptions/$SUB_APP --filter-severity Equals Sev0 Sev1 Sev2 \ --description "Route high severity alerts to platform on-call" # Maintenance window: one-time suppression of notifications for the myapp resource group az monitor alert-processing-rule create -g $RG_AMBA -n apr-maint-myapp \ --rule-type RemoveAllActionGroups --scopes /subscriptions/$SUB_APP/resourceGroups/$RG_APP \ --schedule-start-datetime "2026-11-21 22:00:00" --schedule-end-datetime "2026-11-22 02:00:00" \ --schedule-time-zone "Eastern Standard Time"
Alert rules: one each for metric, log search, and activity log
VM_ID=$(az vm show -g $RG_APP -n $VM --query id -o tsv) # Platform metric alert (does not depend on the agent) az monitor metrics alert create -g $RG_AMBA -n alert-vm-cpu-myapp --scopes $VM_ID \ --condition "avg Percentage CPU > 85" --window-size 15m --evaluation-frequency 5m \ --severity 2 --action $AG_ID --description "CPU above 85% for 15 minutes" # Log search alert: heartbeat loss (workspace as scope) az monitor scheduled-query create -g $RG_AMBA -n alert-heartbeat-lz --scopes $LAW_ID \ --condition "count 'HB' > 0" \ --condition-query HB="Heartbeat | summarize Last=max(TimeGenerated) by Computer, _ResourceId | where Last < ago(10m)" \ --evaluation-frequency 5m --window-size 6h --severity 1 --action-groups $AG_ID # Activity log alert: someone deleted a resource group az monitor activity-log alert create -g $RG_AMBA -n alert-rg-delete \ --scope /subscriptions/$SUB_APP \ --condition category=Administrative and operationName=Microsoft.Resources/subscriptions/resourceGroups/delete \ --action-group $AG_ID
scheduled-query is part of the scheduled-query extension. For condition syntax, use az monitor scheduled-query create -h as the reference.
View AMBA assignments and fired alerts
az policy assignment list --scope /providers/Microsoft.Management/managementGroups/landingzones \
--query "[?starts_with(name,'Deploy-AMBA')].{name:name, display:displayName}" -o table
# Across subscriptions, view alerts from the last 24 hours (Resource Graph)
az graph query -q "alertsmanagementresources
| where type =~ 'microsoft.alertsmanagement/alerts'
| where properties.essentials.startDateTime > ago(1d)
| project name, sev=properties.essentials.severity, state=properties.essentials.monitorCondition, target=properties.essentials.targetResourceName" --first 50 -o table
Name Sev State Target ------------------------- ----- -------- ------------- AMBA-ALZ: VM Heartbeat … Sev1 Fired vm-myapp-test alert-vm-cpu-myapp Sev2 Resolved vm-myapp-test
Lab 3: Build a complete alert chain and verify suppression (about 25 minutes)
> 5 and the window to 5 minutes.az vm run-command invoke to run 10 minutes of CPU load on the test VM:
az vm run-command invoke -g $RG_APP -n $VM --command-id RunShellScript \ --scripts "timeout 600 sh -c 'while :; do :; done' &"
landingzones, and rename the alert resource group to rg-alz-amba-cc. After remediation, check the scheduledQueryRules that appear in the subscription.Case 1: 4,000 emails in the first week after rolling out AMBA
Problem: The platform team assigned all AMBA policy sets on the intermediate root at once. Dev and test subscriptions also sit under landingzones, so a flood of low-value alerts hit the same mailbox. Approach: Tag the dev and test subscriptions with MonitorDisable=Dev / Test (or move them to a separate management group); switch notifications to BYO: Sev0–1 go to the on-call system (webhook), Sev2–4 go only to the ITSM queue; enable policy sets in batches by resource type. Lesson: Define who is responsible for which kind of alert first, then turn it on.
Case 2: The heartbeat alert never fired, until a real outage happened
Problem: A batch of Windows VMs was down for two hours with no alert. Cause: They had been moved into a subscription and never had a remediation task run, so they had no AMA and no Heartbeat records. The heartbeat alert's KQL only counts machines that had a heartbeat before but don't now. Approach: Add an "onboarding coverage" query to the review (VM count in Resource Graph vs. VM count in Heartbeat), and alert on the gap. Lesson: Log-based alerts can only see machines that are actually collecting data.
Case 3: Alerts "disappeared" after the maintenance window ended
Problem: A team used a suppression rule to cover weekend maintenance, but on Monday they found that a disk alert from early Sunday morning, unrelated to the maintenance, had not been notified. Cause: The suppression scope covered the entire resource group and was not filtered by alert rule; suppressed alerts are not re-sent after the window ends. Approach: Add filters to the suppression rule (resource, alert rule name), and keep the window as short as possible; on-call staff should review the "fired but suppressed" alert list after the window ends.
Common errors and fixes
The AMBA policy is assigned, but the subscription has no alert rules at all
Cause: Existing subscriptions need a remediation task; or the subscription or resource group has MonitorDisable; or the resource providers Microsoft.AlertsManagement and Microsoft.Insights are not registered. Diagnosis: az policy state list --management-group landingzones --filter "policyAssignmentName eq 'Deploy-AMBA-VM'"; check the subscription tags. Fix: Register the providers, remove the tag, and create a remediation task.
The CPU / memory log alerts always return zero results
Cause: The VM has no VM Insights data (there are no records in InsightsMetrics with Origin == "vm.azm.ms"). Fix: Go back to Module 2 and add the DCRA; confirm that the DCR's destination is the workspace the alert query uses.
Log search alert fails: the managed identity cannot query Azure Resource Graph (arg function)
Cause: AMBA's VM log alerts run KQL with arg("") under a managed identity, and that identity lacks Reader permission, or the BYO UAMI parameter was left empty. Fix: Grant Reader on the corresponding management group to id-amba-alz-arg-reader-… (or your BYO UAMI), and grant read access to the workspace.
The alert fired, but no notification was received
Diagnosis order: (1) Alert details → History: check whether a suppression rule handled it; (2) whether an alert processing rule was created within the last 30 minutes; (3) whether the email recipient in the action group has unsubscribed (recipient status); (4) service health alerts are not affected by alert processing rules, so they need a rule that references the action group directly.
Two notifications for the same Azure service event
Cause: Deploy-SvcHealth-BuiltIn (ALZ) and Deploy-AMBA-Res-SvcHlth (AMBA) both deploy service health alerts. Fix: Keep one of them: set creation_enabled to false on one of the assignments through IaC, or use a BYO action group consistently.
1. List all alert processing rules in the subscription, with their type and whether they are enabled.
az monitor alert-processing-rule list \
--query "[].{name:name, rg:resourceGroup, enabled:properties.enabled, action:properties.actions[0].actionType}" -o table2. Write a KQL query for machines with no heartbeat in the last 10 minutes but a heartbeat within the past 24 hours.
Heartbeat | where TimeGenerated > ago(24h) | summarize LastSeen = max(TimeGenerated) by Computer, _ResourceId | where LastSeen < ago(10m)
The company already has a central action group in the management subscription for its ServiceNow integration. The platform team wants all Landing Zone AMBA alerts to use it, without creating an action group in each subscription. How do you configure AMBA? What are the limitations?
Use the BYO parameter BYOActionGroup on Deploy-AMBA-Notification to point to this central action group (and BYOAlertProcessingRule if needed). Limitation: an alert processing rule can only apply to alerts in the same subscription, so each subscription still needs an alert processing rule (deployed by policy) that references this cross-subscription action group. The action group itself can be referenced by rules in other subscriptions. Service health alerts are not affected by alert processing rules, so the same setting must also be specified in the BYO parameters of Deploy-AMBA-Res-SvcHlth.
Verified training videos
Official documentation
- AMBA: Azure Landing Zones pattern
- Introduction to deploying the AMBA-ALZ pattern
- Alert processing rules
- ALZ Library platform/amba
Video storyboard script (about 90 seconds)
This courseware cannot generate a video or MP3 directly. A storyboard and narration script are provided for you to hand to a video tool.
Visual: Several "alert policy set" tags light up on the management group tree; a new subscription is dragged into landingzones, and alert rule icons appear inside it automatically.
Narration: Baseline alerts are attached to the management group as policy. When a subscription is moved in, it gets the recommended alerts.
Visual: The CPU curve crosses the 85% red line, the rule icon flashes, and it turns into a "Sev2 Fired" card.
Narration: The rule evaluates data within its evaluation window at the set frequency. When the threshold is exceeded, the alert fires.
Visual: The card passes through a gate (an alert processing rule), gets an action group label, and flies to the mailbox and the ticketing system. Another card is stopped by the gate during the maintenance period but stays in the list.
Narration: Alert processing rules can add action groups, and they can also suppress notifications during maintenance.
Visual: A VM with no data connection; CPU is off the charts, but no card is produced at all.
Narration: Log alerts depend on data. Without collection, there are no alerts.
Module 4 · Microsoft Defender for Cloud and security baselines
- Distinguish Foundational CSPM (free) from Defender CSPM (paid), and the workload protection plans such as Defender for Servers, Storage, SQL, Containers, and Key Vault.
- Read the Defender-related assignments that ALZ makes on the intermediate root
alz, especially the 12 plan switches, security contacts, and continuous export parameters ofDeploy-MDFC-Config-H224; know that the "library defaults" differ from the "accelerator defaults." - Calculate the classic secure score: control score = max score ÷ (healthy + unhealthy resources) × healthy resources. Know that the risk-based Cloud Secure Score in the Defender portal is a separate model.
- Send Defender recommendations, alerts, and secure scores to the central workspace, and keep them separate from Azure Policy compliance reports.
What: The two tracks of Defender for Cloud
| Category | Plan | What you get | Billing |
|---|---|---|---|
| Security posture management (CSPM) | Foundational CSPM | MCSB recommendations, classic secure score, asset inventory, workflow automation, data export | Free |
| Defender CSPM | Attack path analysis, agentless VM vulnerability and secrets scanning, regulatory compliance assessments (standards beyond MCSB), governance rules, cloud security explorer, AI / API / data security posture, and more | Billed per billable resource, such as VMs, storage accounts, and databases | |
| Cloud workload protection (CWP) | Defender for Servers (P1 / P2) | Defender for Endpoint integration, vulnerability assessment, agentless scanning in P2, file integrity monitoring, and more | Billed per server per hour |
| Storage, SQL, SQL on machines, open-source relational databases, Cosmos DB, App Service, Key Vault, Resource Manager, Containers, APIs, AI services | Threat detection and alerts (SecurityAlert); some plans include malware scanning or vulnerability assessment | Per resource / transaction (see the pricing page) |
Why: why ALZ configures Defender on the intermediate root
A Defender plan is a subscription-level setting (Microsoft.Security/pricings). If each application team turns on plans itself, some will be missed. ALZ uses a DINE assignment on the intermediate root to ensure that every subscription placed in the hierarchy has the agreed plans enabled, a security contact configured, and data exported to the central workspace. This is the "Policy-driven governance" principle.
How: ALZ's Defender-related assignments (library 2026.11.0)
| Assignment | Management group | Purpose |
|---|---|---|
Deploy-MDFC-Config-H224 | alz | Policy set Deploy-MDFC-Config_20240319: enables plans through 12 switches, sets the security contact email, and configures continuous export to the central workspace (default export resource group parameter: rg-mdfc-export-prod) |
Deploy-ASC-Monitoring, Deploy-MCSB2-Monitoring | alz | Assigns the Microsoft cloud security benchmark (MCSB) policy set, which produces audit recommendations that drive the secure score |
Deploy-MDEndpoints, Deploy-MDEndpointsAMA | alz | Deployments related to Defender for Endpoint integration |
Deploy-MDFC-OssDb, Deploy-MDFC-SqlAtp | alz | Advanced threat protection settings for open-source databases and SQL |
Deploy-MDFC-DefSQL-AMA, Deploy-SQL-Threat | platform / landingzones | Defender for SQL collection on SQL VMs (AMA + DCR, Module 2) and SQL threat detection |
The 12 switches of Deploy-MDFC-Config-H224: enableAscForServers, enableAscForServersVulnerabilityAssessments, enableAscForSql, enableAscForAppServices, enableAscForStorage, enableAscForContainers, enableAscForKeyVault, enableAscForSqlOnVm, enableAscForArm, enableAscForOssDb, enableAscForCosmosDbs, enableAscForCspm.
Disabled (only the security contacts and export are deployed). The Terraform starter template in the IaC Accelerator, however, sets them to DeployIfNotExists. The accelerator documentation says "Defender plan policies are enabled by default," and shows how to turn off individual plans with policy_assignments_to_modify. So "which plans we have enabled" must be answered from the parameters in your own IaC, not from the library.Secure score: two models
- Classic secure score (Azure portal): only recommendations from MCSB that are generally available count toward the score; preview recommendations are not scored. Each control is calculated every 8 hours. Control current score = max score ÷ (healthy + unhealthy resources) × healthy resources. Subscription score = sum of the current scores of the controls ÷ sum of their max scores; with multiple subscriptions, the score is weighted by resource count. Controls with no assessment results are excluded. Example max scores: enable MFA 10, protect management ports 8, apply system updates 6, remediate vulnerabilities 6, remediate security configurations 4, encrypt data in transit 4, enable auditing and logging 1.
- Cloud Secure Score (risk-based) (Defender portal): factors in asset risk (such as internet exposure and data sensitivity) and asset importance. Its values cannot be compared directly with the classic score.
When: the difference between Defender and Azure Policy compliance
A large share of Defender recommendations come from MCSB policy sets (Audit / AuditIfNotExists), so the two views show similar "noncompliant" results. The difference: Policy compliance answers "Do we meet the rules we assigned?" Defender answers "How big is the risk, and what should we fix first?", and it also provides threat detection alerts. Platform teams typically use Policy as guardrails (Deny / DINE), and Defender for posture and threats.
- “Deploying ALZ turns on all Defender plans.” It depends on the parameters of
Deploy-MDFC-Config-H224in your IaC; the library defaults are all Disabled. - “The secure score updates in real time.” Controls are calculated every 8 hours, so you have to wait after a fix.
- “Fixing one recommendation in a control earns you that control's points.” You must fix all recommendations for that resource within the control before the resource counts as healthy.
- “Defender for Servers P2 requires MMA.” P2 now uses agentless scanning, and the migration page explicitly says to move from the old agent to agentless scanning.
Architecture diagram: one DINE assignment, three kinds of effects
How the secure score is calculated
Interactive calculator: which control is the best to fix
The sample subscription has 6 controls (max scores taken from the official control table). Click "Fix 1 resource" to see how the control score and subscription score change. Check "Include preview recommendations" to see that preview recommendations are not scored. Numbers are illustrative.
View and set Defender plans (subscription level)
az account set -s $SUB_APP
az security pricing list --query "value[].{plan:name, tier:pricingTier, sub:subPlan}" -o table
Plan Tier Sub ----------------------------- -------- ----- VirtualMachines Free SqlServers Free AppServices Free StorageAccounts Free KeyVaults Free Arm Free CloudPosture Free Containers Free ...
# Manual enablement (in production, Deploy-MDFC-Config-H224 handles this; switch back to Free after the lab)
az security pricing create -n VirtualMachines --tier standard --subplan P1
az security pricing create -n KeyVaults --tier standard
# Security contact
az security contact create -n default --emails secops@contoso.example \
--alert-notifications '{"state":"On","minimalSeverity":"High"}' \
--notifications-by-role '{"state":"On","roles":["Owner"]}'
The parameters of az security contact change with the API version; check them with -h before running.
Actual parameters of the ALZ assignment
az policy assignment show --name Deploy-MDFC-Config-H224 \
--scope /providers/Microsoft.Management/managementGroups/alz \
--query "parameters | {servers:enableAscForServers.value, storage:enableAscForStorage.value, cspm:enableAscForCspm.value, export:ascExportResourceGroupName.value, contact:emailSecurityContact.value}"
{
"contact": "secops@contoso.example",
"cspm": "DeployIfNotExists",
"export": "rg-mdfc-export-prod",
"servers": "DeployIfNotExists",
"storage": "DeployIfNotExists"
}
Secure score: API and Resource Graph
az security secure-scores list --query "[].{name:displayName, current:score.current, max:score.max, pct:score.percentage}" -o table
az graph query -q "securityresources
| where type == 'microsoft.security/securescores/securescorecontrols'
| extend control = tostring(properties.displayName), unhealthy = toint(properties.unhealthyResourceCount),
current = todouble(properties.score.current), max = todouble(properties.score.max)
| project subscriptionId, control, unhealthy, current, max, gain = max - current
| order by gain desc" --first 20 -o table
View exported Defender data in the workspace
SecurityRecommendation | where TimeGenerated > ago(1d) and RecommendationState == "Unhealthy" | summarize Resources = dcount(AssessedResourceId) by RecommendationDisplayName, RecommendationSeverity | order by Resources desc
Lab 4: Verify the Defender configuration and find the most cost-effective fix (about 15 minutes, free)
az security pricing list separately, compare the results with the parameters of Deploy-MDFC-Config-H224 in your IaC, and fill in a "plan × subscription" table.az policy state summarize --management-group alz --filter "policyAssignmentName eq 'Deploy-MDFC-Config-H224'". Confirm there are no noncompliant subscriptions; if there are, create a remediation task.gain, and find the 2 controls with the biggest gain.Free: az security pricing create -n VirtualMachines --tier free.Case 1: Thought everything was on, but not a single plan was enabled
Problem: A team deployed directly with avm-ptn-alz using the library defaults. During an audit they found that all subscriptions had Defender plans set to Free, yet Deploy-MDFC-Config-H224 showed 100% compliance. Cause: The switches in this library assignment are all Disabled, so "compliant" only means that everything the policy was told to do, according to its parameters, has been done. Approach: In policy_assignments_to_modify, change the switches you need to DeployIfNotExists, and decide whether to enable P2 based on subscription type (production or development). Lesson: A high compliance rate does not mean you are protected; check the parameters.
Case 2: An unexpected bill for Defender for Servers
Problem: After Defender for Servers P2 was turned on across the intermediate root, many short-lived VMs in the sandbox subscriptions also generated charges. Approach: Defender plans are set per subscription. For subscriptions under the sandbox management group, use a separate assignment (or an exemption) to set P1 / Free; keep production on P2. Lesson: Configure security plans per management group, and budget security costs separately (Module 6).
Case 3: The secure score "dropped 15 points"
Problem: One day the score fell sharply, and management assumed a security incident had occurred. Cause: A batch of new subscriptions had been onboarded (more resources, which lowers the overall score by weight), and at the same time Microsoft added more recommendations to scoring (for example, starting 2026-06-30 multicloud recommendations began to affect the score). Approach: Explain it with the "secure score over time" workbook and a change log, and in reviews, look at the absolute number of unhealthy resources as well.
Common errors and fixes
Deploy-MDFC-Config-H224 remediation fails: missing permissions or Microsoft.Security not registered
Cause: The new subscription has not registered Microsoft.Security, or the assignment's managed identity lacks a role required by the definition on the subscription (such as Security Admin or Contributor). Fix: Register the resource provider, regenerate the role assignments through IaC, and then run the remediation task again.
Continuous export is not sending data to the workspace
Cause: The export resource group has not been created (parameter ascExportResourceGroupName), the workspace ID parameter is still a placeholder value, or the resource provider in the workspace's subscription is not registered. Diagnosis: az security automation list -o table. Fix: Correct the logAnalytics value in the assignment parameters, then remediate again.
Recommendations are fixed, but the secure score has not changed in a whole day
Cause: Controls are calculated every 8 hours; a resource counts as healthy only when all of its recommendations in the control are healthy; preview recommendations are not scored. Fix: Wait for the next calculation, and check the other recommendations in the same control.
The secure score page shows the management group score as "Restricted"
Cause: You do not have sufficient permissions on some of the subscriptions under this management group. Fix: Assign Security Reader on alz to the security team (or the Security-Operations custom role from hour 3).
Paid plans were turned on in a sandbox subscription
Cause: Deploy-MDFC-Config-H224 is on the intermediate root, which covers the sandbox. Fix: Create an exemption for this assignment on the sandbox management group, or create a separate assignment for the sandbox with different switch settings. Note that when multiple DINE assignments write the same pricings resource, they overwrite each other, so prefer exemptions.
1. List the subscriptions whose VirtualMachines plan is still Free.
az graph query -q "securityresources | where type == 'microsoft.security/pricings' and name == 'VirtualMachines' | where properties.pricingTier == 'Free' | project subscriptionId" -o table
2. List the number of unhealthy resources for the "apply system updates" control in each subscription.
az graph query -q "securityresources | where type == 'microsoft.security/securescores/securescorecontrols' | where properties.displayName == 'Apply system updates' | project subscriptionId, unhealthy = properties.unhealthyResourceCount" -o table
The CISO requires: on all production subscriptions, Defender for Servers P2, Storage, Key Vault, and Defender CSPM are enabled; development subscriptions need only Foundational CSPM; sandboxes enable nothing. The existing hierarchy is the ALZ default, and both development and production subscriptions are under corp. How do you implement this?
First, fix the hierarchy problem. When development and production sit under the same management group, you cannot use management-group-level differences (the ALZ principle is not to create management groups by environment). Options: (1) keep Deploy-MDFC-Config-H224 on the intermediate root as the "production configuration," create an exemption for the development subscriptions, and add a subscription-level assignment set to Disabled; (2) or use resourceSelectors in the policy assignment, or subscription tags, to differentiate (Defender plans are subscription-level resources, so you can select them by subscription scope). Create an exemption on the sandbox management group. Note that when multiple DINE assignments write the same pricings resource, you get drift where whoever remediates last wins, so prefer "exemptions + a single assignment."
Verified training videos
Official documentation
- What is Cloud Security Posture Management (CSPM)
- Cloud secure score in Microsoft Defender for Cloud
- ALZ IaC Accelerator documentation (Turn off Defender Plans)
Video storyboard script (about 90 seconds)
This courseware cannot generate a video or MP3 directly. A storyboard and narration script are provided for you to hand to a video tool.
Visual: Two tracks: "Posture" on the left and "Threat protection" on the right. On the left, the free tier lights up green; on the right, each shield carries a price tag.
Narration: Defender for Cloud is split into posture management and workload protection. Foundational posture is free, and plans are billed per resource.
Visual: A policy icon on the intermediate root sends 12 switches out to all subscriptions. The camera zooms in, and every switch is grey "Disabled."
Narration: In the ALZ Library, this assignment has every switch turned off by default. Which ones you turn on depends on your deployment parameters.
Visual: Control card: max score 6, healthy 4, unhealthy 74, calculated as 0.31. After you fix a high-scoring control, the total rises.
Narration: The secure score is calculated per control. A resource earns its points only after all of its recommendations within that control are healthy.
Module 5 · Update Manager and backup policies
- Understand the three capabilities of Azure Update Manager: periodic assessment (every 24 hours), on-demand assessment and installation, and scheduled patching (maintenance configuration + dynamic scope).
- Explain what ALZ's
Enable-AUM-CheckUpdates(Modify effect) does and does not do, and the prerequisite for scheduled patching: "Customer Managed Schedules." - Use the official maintenance window time rules to estimate how many updates a single patching run can install.
- Understand the real behavior of
Deploy-VM-Backup(for each resource group, it creates a new Recovery Services vault per region and protects VMs with the default policy), and the common alternatives used in production.
What: Azure Update Manager
Update Manager is Azure's native patching service. It covers Azure VMs and Arc-enabled servers (Windows and Linux), does not depend on Log Analytics or Azure Automation, and uses Azure RBAC for per-resource access. It replaces Automation Update Management, which depended on the legacy agent (the migration page lists it as the destination for services that depend on MMA).
| Capability | What it does | Key points |
|---|---|---|
| Periodic assessment | Automatically checks for missing updates every 24 hours | It is a VM setting (assessmentMode = AutomaticByPlatform). Only running VMs are assessed; stopped or deallocated VMs are not scanned. Arc subscriptions need Microsoft.Compute registered. |
| On demand | Check or install immediately | "Check for updates" in the portal, or az vm assess-patches / az vm install-patches |
| Scheduled patching | Installs on a regular basis according to a maintenance configuration (Maintenance Configuration, scope InGuestPatch) | Azure VMs must set patch orchestration to Customer Managed Schedules (patchMode = AutomaticByPlatform and bypassPlatformSafetyChecksOnUserSchedule = true); Arc has no such prerequisite. |
| Dynamic scope | Grouped by subscription, resource group, location, resource type, OS, and tags | Evaluated at runtime; each dynamic scope supports up to 1,000 resource associations |
Why: ALZ only turns on "visibility" for you
ALZ assigns Enable-AUM-CheckUpdates on platform and landingzones. It is a custom policy set, Deploy-AUM-CheckUpdates, that references two built-in Modify definitions: 59efceea-… for Azure VMs and bfea026e-… for Arc, each with Windows and Linux references. The parameter is assessmentMode = AutomaticByPlatform. Result: each VM automatically gets periodic assessment, and the "apply system updates" control in the secure score (max 6 points) has data. It does not install any patches. When to install, what to install, and whether to allow reboots are decisions for the workload teams; ALZ does not make them for you.
How: the maintenance window time rules (official)
| System | Rule |
|---|---|
| Windows | Installing a Service Pack requires at least 20 minutes left in the window, or it is skipped; other updates need 15 minutes left; when a reboot is required, at least 10 minutes must be left, or the reboot is skipped. After a reboot, Azure VMs have up to 15 minutes (Arc: 25 minutes) to finish. |
| Linux | A reboot requires at least 15 minutes left (Azure VMs only). Updates are installed in batches: when batch size X ≤ 3, the minimum time needed is 5 × X minutes; when X > 3, it is 15 + 2 × (X − 3) minutes. The batch size is determined by the service. |
| General | The window lasts at most 3 hours 55 minutes. Near the end of the window, updates already being installed are not interrupted, but no further updates are started. |
Service limits: 250 schedules per subscription per region; each schedule supports up to 3,000 resource associations; each schedule supports up to 200 dynamic scopes.
How: what Deploy-VM-Backup actually does
ALZ assigns Deploy-VM-Backup on landingzones and identity. This is the built-in policy "Configure backup on virtual machines without a given tag to a new recovery services vault with a default policy" (98d0b9f8-…, 9.6.0, Indexed, DeployIfNotExists). Reading its deployment template tells you:
- It creates a Recovery Services vault in the resource group where the VM is, named
RSVault-<region>-<guid of the resource group ID>(truncated to 50 characters), SKU Standard. VMs in the same resource group and region share this vault. - It protects the VM with the vault's built-in
DefaultPolicy. - The exclusion mechanism is the tag parameters
exclusionTagName/exclusionTagValue, but the ALZ Library assignment sets none of these parameters, so by default every VM under landingzones gets backed up. - The roles the definition requires are Virtual Machine Contributor and Backup Contributor.
When: how to use it in production
- Treat
Deploy-VM-Backupas a safety net: it ensures no VM is left unbacked up. - When you need a centralized vault, an enhanced policy (Enhanced, which supports hourly backups), immutable vaults, multi-user authorization, or cross-region restore, a common approach is to give workloads a tag-based built-in policy that uses an existing vault (for example, back up by tag to an existing vault in the same region). Then set an exclusion tag for
Deploy-VM-Backupin IaC, so the same VM is not claimed by two vaults. - Backup alerts go through Azure Monitor: AMBA's
Deploy-AMBA-RecoverySvcand the vault health alerts on management. Alert processing rules can add action groups to backup alerts (the official docs state that backup alerts are one of the types for which rules cannot specify action groups).
- “ALZ is deployed, so patches get applied automatically.”
Enable-AUM-CheckUpdatesonly turns on periodic assessment. - “A 6-hour maintenance window is safer.” The limit is 3 hours 55 minutes. If updates do not finish, split the schedule or reduce the scope of updates per run.
- “The window forcibly stops installation when it ends.” It does not interrupt updates in progress; it only stops new ones from starting.
- “Deploy-VM-Backup backs up to a central platform vault.” It creates a new vault in each VM's resource group.
Architecture diagram: three policies control a VM's "patching and recovery"
Interactive simulator: can this maintenance window install everything?
Simulates one scheduled patching run using the official maintenance window time rules. Update durations are examples; the rules themselves come from the Scheduled patching documentation.
Assessment and on-demand install
az account set -s $SUB_APP
# Check whether the ALZ Modify policy has periodic assessment set
az vm show -g $RG_APP -n $VM --query "osProfile.linuxConfiguration.patchSettings" -o jsonc
# Run an assessment now
az vm assess-patches -g $RG_APP -n $VM --query "{status:status, critical:criticalAndSecurityPatchCount, other:otherPatchCount}"
# Install now (critical and security updates only, up to 2 hours, reboot if needed)
az vm install-patches -g $RG_APP -n $VM --maximum-duration PT2H --reboot-setting IfRequired \
--classifications-to-include-linux Critical Security
{
"assessmentMode": "AutomaticByPlatform",
"automaticByPlatformSettings": null,
"patchMode": "ImageDefault"
}
{
"critical": 3,
"other": 11,
"status": "Succeeded"
}
Scheduled patching: prerequisite → maintenance configuration → assignment
# 1) Prerequisite: Customer Managed Schedules az vm update -g $RG_APP -n $VM --set \ osProfile.linuxConfiguration.patchSettings.patchMode=AutomaticByPlatform \ osProfile.linuxConfiguration.patchSettings.automaticByPlatformSettings.bypassPlatformSafetyChecksOnUserSchedule=true # 2) Maintenance configuration: every Saturday at 02:00 (Eastern Time), 2-hour window az maintenance configuration create -g $RG_APP --resource-name mc-lz-weekly-cc -l $LOC \ --maintenance-scope InGuestPatch --extension-properties InGuestPatchMode=User \ --maintenance-window-start-date-time "2026-11-21 02:00" --maintenance-window-duration "02:00" \ --maintenance-window-recur-every "Week Saturday" --maintenance-window-time-zone "Eastern Standard Time" \ --reboot-setting IfRequired \ --install-patches-linux-parameters classifications-to-include="Critical" classifications-to-include="Security" MC_ID=$(az maintenance configuration show -g $RG_APP --resource-name mc-lz-weekly-cc --query id -o tsv) # 3) Assign to the VM (static); for large fleets, use a dynamic scope or the built-in policy "Schedule recurring updates using Azure Update Manager" az maintenance assignment create -g $RG_APP --name mca-myapp --maintenance-configuration-id $MC_ID \ --provider-name Microsoft.Compute --resource-type virtualMachines --resource-name $VM
az maintenance belongs to the maintenance extension. Check the parameter format with -h.
Check patch compliance with Resource Graph
az graph query -q "patchassessmentresources
| where type =~ 'microsoft.compute/virtualmachines/patchassessmentresults'
| extend vm = tostring(split(id, '/')[8]), crit = toint(properties.availablePatchCountByClassification.critical),
sec = toint(properties.availablePatchCountByClassification.security), last = todatetime(properties.lastModifiedDateTime)
| project vm, crit, sec, last
| order by crit desc" -o table
Backup: confirm the result of Deploy-VM-Backup
az backup vault list -g $RG_APP --query "[].{name:name, loc:location}" -o table
VAULT=$(az backup vault list -g $RG_APP --query "[0].name" -o tsv)
az backup item list -g $RG_APP -v $VAULT --backup-management-type AzureIaasVM \
--query "[].{vm:properties.friendlyName, policy:properties.policyName, state:properties.protectionState, last:properties.lastBackupTime}" -o table
Name Loc ------------------------------------ ------------- RSVault-canadacentral-3f2a9c1e-… canadacentral Vm Policy State Last ------------- ------------- --------- -------------------- vm-myapp-test DefaultPolicy Protected 2026-11-18T03:12:44Z
Lab 5: Patch assessment, scheduled patching and backup check (about 30 minutes)
assessmentMode. If it is not AutomaticByPlatform, check the compliance status of Enable-AUM-CheckUpdates. The Modify policy also needs a remediation task for existing VMs.az vm assess-patches and note the number of critical and security updates.corp and has been running for more than one day, check whether an RSVault-canadacentral-… vault appears. If not, check the compliance of Deploy-VM-Backup and create a remediation task.az backup protection disable -g $RG_APP -v $VAULT --container-name <container> --item-name <item> \ --backup-management-type AzureIaasVM --delete-backup-data true --yes az maintenance assignment delete -g $RG_APP --name mca-myapp --provider-name Microsoft.Compute \ --resource-type virtualMachines --resource-name $VM --yes
Soft delete is on by default, so deleted backup data is kept for a while before it is permanently removed. In a sandbox, you can turn off soft delete in the vault properties before deleting the vault. Note: the policy will deploy backup again to any VM that is still under landingzones, so when the lab ends, delete the VM or add an exclusion tag to the assignment in your IaC.
Case 1: 200 resource groups → 200 Recovery Services vaults
Problem: A year after launch, the security team found many RSVault-… vaults in the subscription, with no standard immutability, multi-user authorization or alert configuration. Cause: Deploy-VM-Backup creates a new vault for each resource group. Fix: The subscription vending process pre-creates one hardened vault for each Landing Zone (immutable, soft delete, cross-region restore), and VMs are connected with the built-in policy that backs up to an existing vault by tag. Add an exclusion tag to Deploy-VM-Backup in IaC as a last safety net. Lesson: Read the deployment template of the policy, not just its display name.
Case 2: The patch window always "partially succeeds"
Problem: Each patch day, the Windows servers only installed half of the updates, with the status CompletedWithWarnings. Cause: In the 2-hour window, one large update was installed first, leaving less than 15 minutes, so the remaining updates were skipped. The reboot was also skipped because less than 10 minutes remained. Fix: Extend the window to 3 hours 55 minutes, or split the cumulative updates and other updates into two schedules. Estimate the time using the rules on the "animation" tab.
Case 3: VMs in the same availability set are patched at the same time
Problem: Two schedules patched VMs in the same availability set at the same time, causing a brief service outage. Fix: The official guidance says VMs in the same availability set are patched in batches by update domain, but running different schedules at the same time can fail or overrun the window. Put the machines of one availability set into staggered schedules, or extend the window.
Common errors and fixes
Scheduled patching never runs, and the VM's patch orchestration shows "Azure-orchestrated" or "Image default"
Cause: The Azure VM is not set to Customer Managed Schedules. Fix: Set patchMode=AutomaticByPlatform and bypassPlatformSafetyChecksOnUserSchedule=true; or use the built-in policy "Schedule recurring updates using Azure Update Manager", which sets the prerequisites too and needs a managed identity with Contributor permissions.
Assessment results for some VMs in Update Manager are out of date
Cause: VMs that are stopped or deallocated are not assessed. For Arc servers, the subscription does not have Microsoft.Compute registered. Fix: Start the VM or accept this state; register the resource provider.
Selected "Never reboot", but the machine still rebooted
Cause: Automatic update or restart policy keys in the Windows registry can trigger a reboot. Fix: Check the Windows Update registry keys using the official link, and let Update Manager control them centrally.
Deploy-VM-Backup remediation failed: vault name conflict or insufficient permissions
Cause: The resource group is restricted by a Deny policy on resource types; or the managed identity lacks Backup Contributor or Virtual Machine Contributor; or the resource group location does not match the VM region, causing a vault location conflict. Diagnosis: Check the failed deployment details of the remediation task. Fix: Grant the missing permissions, adjust the allowed resource types, and if needed add an exclusion tag to the VM and use a centralized vault instead.
Deleting a Recovery Services vault failed: the vault still has protected items or soft-deleted items
Cause: Soft delete is on by default, and deleted backup data is in a soft-deleted state. Fix: Undelete the data before permanently deleting it, or turn off soft delete first in a sandbox. Do not turn it off in production.
1. List all Linux VMs in the subscription whose patch orchestration is not AutomaticByPlatform.
az graph query -q "resources | where type =~ 'microsoft.compute/virtualmachines' | extend mode = tostring(properties.osProfile.linuxConfiguration.patchSettings.patchMode) | where isnotempty(properties.osProfile.linuxConfiguration) and mode != 'AutomaticByPlatform' | project name, resourceGroup, mode" -o table
2. Find all vaults under landingzones that were created by Deploy-VM-Backup.
az graph query -q "resources | where type =~ 'microsoft.recoveryservices/vaults' and name startswith 'RSVault-' | project name, resourceGroup, subscriptionId, location" --management-groups landingzones -o table
A Windows application has 40 VMs and requires: patching early on the Saturday after the second Tuesday of each month; patch 10% of canary VMs first and patch the rest only after the canaries have run for 24 hours; database VMs must not restart automatically. How do you implement this with Update Manager?
Use two maintenance configurations. ① Canary schedule: "second Tuesday of the month + 4 days" (the official support covers an nth weekday with an offset, range ±6 days), with a dynamic scope by tag patchRing=canary. ② Main schedule: the same rule with +1 day (Sunday), tag patchRing=main. Database VMs use a separate schedule with reboot-setting Never, and you check the Windows registry restart keys, so people restart them manually after a maintenance notice. Set all Azure VMs to Customer Managed Schedules first. Estimate the window with the rule that a large update needs 15–20 minutes left; the maximum is 3 hours 55 minutes.
Verified teaching videos
No verified video specifically covering Deploy-VM-Backup or the ALZ backup policy was found, so a storyboard script is provided below.
Official documentation
- Azure Update Manager overview
- Assessment options in Update Manager
- Schedule recurring updates
- Built-in policy: Configure backup on VMs without a given tag…
Video storyboard script (about 90 seconds)
This course material cannot generate a video or MP3 directly. A storyboard and narration script are provided for use with a video tool.
On screen: a radar-scan icon labeled "every 24 hours" appears above a VM, with the words "Look only, don't install" beside it.
Narration: The platform policy only turns on periodic assessment, so missing patches become visible.
On screen: a 2-hour timeline bar, with update blocks placed in order. In the last 12 minutes, one block is left out and the reboot icon turns gray.
Narration: The maintenance window has rules. If there is not enough time left, an update is skipped. The maximum is three hours fifty-five minutes.
On screen: a vault icon pops up in each resource group, until the screen is full of vaults.
Narration: The backup policy creates a new vault in each resource group. In production, you usually switch to a centralized, hardened vault.
Module 6 · Cost management: budgets, tags and FinOps
- Create budgets on management groups, subscriptions and resource groups, configure both actual-cost and forecast-cost thresholds correctly, and know that action groups are only available at the subscription and resource group scopes.
- Understand the delay in cost data (8–24 hours) and the budget evaluation frequency (every 24 hours), and set your expectations for alert timing accordingly.
- Use Cost Management tag inheritance to fill in allocation dimensions, and tell it apart from the Modify policy that inherits tags in Azure Policy.
- Use the lifecycle of the FinOps Framework (Inform / Optimize / Operate) and its stakeholder roles to divide cost responsibilities between the ALZ platform team and the application teams.
What: the objects in Cost Management
| Object | Purpose | Key points from the official docs |
|---|---|---|
| Budget | Sets an amount and thresholds on a scope, and sends a notification when they are exceeded | Scopes: management groups, subscriptions, resource groups, and EA / MCA billing scopes. Reset period: monthly, quarterly or yearly (pay-as-you-go and similar subscriptions can also follow the billing cycle). At least 1 and at most 5 thresholds, and up to 5 email addresses. Thresholds from 0.01% to 1000%. Actual cost and forecast cost are both supported. Does not affect resources and does not stop consumption. |
| Budget + action group | Triggers automation when a threshold is exceeded | Action groups only support budgets at the subscription and resource group scopes. They can call Logic Apps, Functions and runbooks (for example, to shut down dev VMs). |
| Cost analysis | View by service, resource group or tag | Grouping by tag requires the tag to be present on the usage records |
| Tag inheritance | Applies billing account, subscription or resource group tags to usage records | EA, MCA and MPA (Azure plans). It does not change the resources themselves. Takes effect 8–24 hours after it is enabled, for the current month. By default, a resource's own tags take priority; you can change this so inherited tags take priority. |
| Export | Regularly writes cost data to a storage account | Used for the FinOps toolkit, Power BI or a data lake |
Why: why costs in ALZ are naturally easy to manage
- Subscription democratization: one subscription (or group of subscriptions) per application, so the subscription itself is the clearest unit for allocation.
- Management group roll-up: create budgets on
landingzonesandcorpto see trends across a whole business line. (Note: all subscriptions in a management group must use the same currency, or budget alerts may not be received.) - Tag guardrails: Hour 2 uses Deny / Modify policies to make sure resource groups have a
costCentertag, and Cost Management tag inheritance then copies it onto every usage record. - Platform costs tracked separately: costs of the management, connectivity, identity and security subscriptions (workspaces, firewalls, gateways, Defender) belong to the platform and are allocated to application teams at an agreed ratio.
How: budget timing
Cost and usage data is usually available within 8–24 hours. Budgets are evaluated against this data every 24 hours, and once a threshold is met, the email is usually sent within 1 hour. So budget alerts are naturally a day behind: good for trend control, not for stopping spend within seconds. Real-time protection should come from quotas, policies (for example, blocking expensive SKUs) and resource-level alerts. A new subscription can take up to 48 hours to get all Cost Management features. Budget evaluation uses actual cost (not amortized cost).
How: the FinOps Framework
- Six principles: teams need to collaborate; business value drives technology decisions; everyone is accountable for their own technology usage; FinOps data should be accessible, timely and accurate; FinOps should be enabled centrally; and the variable cost model of the cloud should be used.
- Lifecycle: Inform (visibility, allocation, budgets, forecasts) → Optimize (reduce waste, rate optimization) → Operate (KPIs and governance policies).
- Capability domains: understand usage and cost (data ingestion, allocation, reporting, anomaly management); quantify business value (planning estimates, forecasting, budgeting, benchmarking, unit economics); optimize usage and cost (architect for the cloud, workload optimization, rate optimization, licensing and SaaS, cloud sustainability); manage the FinOps practice (education, operations, workload onboarding, policy and governance, invoicing and chargeback, assessment, tools, cross-framework).
- Stakeholders: the core group includes procurement, finance, leadership, business owners, product owners, engineering teams and FinOps practitioners; adjacent groups include sustainability, ITFM/TBM, ITSM/ITIL, ITAM and security teams. Maturity is rated Crawl / Walk / Run, and a reassessment every 3–6 months is recommended.
When: example RACI in ALZ
| Activity | Platform team | Application team | Finance / FinOps |
|---|---|---|---|
| Tagging standards and policies (hour 2) | R / A | C | C |
| Create subscription budgets when subscriptions are vended (hour 6) | R | I | A |
| Workload optimization (rightsizing, reserved instances) | C | R / A | C |
| Platform cost allocation rules | R | I | A |
| Exception handling | C | R | A |
- "A budget reaching 100% will automatically stop resources" — A budget only sends notifications. To stop resources, you need an action group to trigger automation, and that is only available at the subscription or resource group scope.
- "Tag inheritance in Cost Management will tag my resources" — It only applies to usage records. Tags on resources still need Azure Policy.
- "A budget on a management group can text the on-call engineer" — Management group budgets don't support action groups; they can only send email.
- "A budget alert will tell me this morning about last night's overspend" — The 8–24 hour data delay plus the 24-hour evaluation cycle means it could be even later.
Cost governance layers
Where the FinOps lifecycle fits in ALZ
Interactive simulator: when a budget alert actually arrives
Simulate a month of daily costs. Budgets are evaluated every 24 hours, with a 1-day data delay. The forecast uses a linear simplification: month-to-date daily average × days in the month (the official forecast model is more complex).
Subscription budget (with action group) — use REST for the most complete parameters
az account set -s $SUB_APP
AG_ID=$(az monitor action-group show -g $RG_AMBA -n ag-alz-ops-cc --query id -o tsv)
cat > budget.json <<EOF
{
"properties": {
"category": "Cost",
"amount": 500,
"timeGrain": "Monthly",
"timePeriod": { "startDate": "2026-11-01T00:00:00Z", "endDate": "2027-10-31T00:00:00Z" },
"notifications": {
"actual80": { "enabled": true, "operator": "GreaterThanOrEqualTo", "threshold": 80, "thresholdType": "Actual",
"contactEmails": ["finops@contoso.example"], "contactGroups": ["$AG_ID"] },
"actual100": { "enabled": true, "operator": "GreaterThanOrEqualTo", "threshold": 100, "thresholdType": "Actual",
"contactEmails": ["finops@contoso.example"], "contactGroups": ["$AG_ID"] },
"forecast100":{ "enabled": true, "operator": "GreaterThan", "threshold": 100, "thresholdType": "Forecasted",
"contactEmails": ["finops@contoso.example"] }
}
}
}
EOF
az rest --method put \
--url "https://management.azure.com/subscriptions/$SUB_APP/providers/Microsoft.Consumption/budgets/budget-lz-myapp-monthly?api-version=2023-11-01" \
--body @budget.json
The start date must be the first day of a month. The CLI also has commands such as az consumption budget create-with-rg (resource group scope), but the official docs note that the CLI may not support the latest API, so REST, ARM or Bicep is recommended.
Management group budget (email only)
az rest --method put \
--url "https://management.azure.com/providers/Microsoft.Management/managementGroups/landingzones/providers/Microsoft.Consumption/budgets/budget-landingzones-q?api-version=2023-11-01" \
--body '{"properties":{"category":"Cost","amount":15000,"timeGrain":"Quarterly","timePeriod":{"startDate":"2026-10-01T00:00:00Z"},"notifications":{"a90":{"enabled":true,"operator":"GreaterThanOrEqualTo","threshold":90,"contactEmails":["finops@contoso.example"]}}}}'
View cost by tag (Cost Management query API)
az rest --method post \
--url "https://management.azure.com/subscriptions/$SUB_APP/providers/Microsoft.CostManagement/query?api-version=2023-11-01" \
--body '{"type":"ActualCost","timeframe":"MonthToDate","dataset":{"granularity":"None","aggregation":{"totalCost":{"name":"Cost","function":"Sum"}},"grouping":[{"type":"TagKey","name":"costCenter"}]}}' \
--query "properties.rows"
[ [ 212.47, "costcenter", "cc-1000", "USD" ], [ 18.02, "costcenter", "", "USD" ] ]
Costs in the second row with an empty tag value cannot be allocated to a person. Check whether tag inheritance is enabled, and whether the hour 2 tag policy covers resource groups.
Which logs are the most expensive (connecting Module 1 and cost)
Usage | where TimeGenerated > startofmonth(now()) and IsBillable | summarize GB = sum(Quantity) / 1000 by Solution, DataType | order by GB desc
Lab 6: Create a budget for the myapp subscription and verify the alert chain (about 15 minutes plus waiting)
landingzones (email only).costCenter and find costs without tags.az rest --method delete --url …/budgets/budget-lz-myapp-monthly?api-version=2023-11-01) and keep the one with a reasonable amount.Case 1: The management group budget has no alerts
Problem: The group created a budget on landingzones, but nobody received an email even though spending was 30% over. Cause: A subscription billed in euros sat under the management group alongside dollar-billed subscriptions. The official guidance requires all subscriptions in a management group to use the same currency, or budget alerts may not be received. Fix: Move the euro subscription to a separate management group, or use a subscription-level budget instead. Check the currency during subscription vending.
Case 2: Dev environment burns money over the weekend
Problem: Large VMs in the dev subscription kept running over the weekend. Fix: Subscription budget at the 80% actual threshold → action group → Logic App, which deallocates VMs tagged env=dev and notifies the person named in the owner tag. Also use policies on the sandbox / dev management group to restrict the allowed VM SKUs. Lesson: Budgets plus automation are a "slow brake"; SKU policies are the "guardrail".
Case 3: Nobody claims the platform costs
Problem: The connectivity subscription (firewalls, gateways) and the management subscription (workspaces, Defender) made up 25% of total spending, and business units refused to share the cost. Fix: The FinOps team set allocation rules: firewalls by processed traffic, workspaces by each subscription's _BilledSize (the query from Module 1), and Defender by the number of protected resources. Export cost data each month, and use the FinOps toolkit or Power BI to produce the chargeback report. Lesson: Agree on allocation rules in advance, and make sure the data can be recalculated.
Common errors and fixes
Error when creating a budget: start date must be the first day of a month (check the exact error text in your environment)
Cause: The budget start date must be the first day of a month. Fix: Change startDate to the 1st of the current month.
The "action group" option cannot be found on a management group budget
Cause: Action groups only support budgets at the subscription and resource group scopes. Fix: Use management group budgets for trend emails only, and put automation on subscription budgets.
Cannot create a budget or see cost data in a new subscription
Cause: A new subscription can take up to 48 hours to get all Cost Management features. Fix: Have the subscription vending pipeline create the budget after 48 hours, or allow retries.
Many costs show an empty tag when grouped by costCenter
Cause: The resources have no tags of their own, and Cost Management tag inheritance is not enabled; or the resources generate no usage (purchase-type charges do not inherit subscription tags). Fix: Enable tag inheritance; use the Modify policy from hour 2 to add tags to resources; and for purchase-type charges, use cost allocation rules.
Budget emails land in the spam folder
Fix: Add azure-noreply@microsoft.com to your allowed senders. For critical alerts, use an action group (webhook / ITSM) instead of relying on email alone.
1. List all budgets in the subscription, with their amounts and current spend.
az rest --method get \
--url "https://management.azure.com/subscriptions/$SUB_APP/providers/Microsoft.Consumption/budgets?api-version=2023-11-01" \
--query "value[].{name:name, amount:properties.amount, spent:properties.currentSpend.amount, grain:properties.timeGrain}" -o table2. Use Resource Graph to find the resource groups that have no costCenter tag.
az graph query -q "resourcecontainers | where type =~ 'microsoft.resources/subscriptions/resourcegroups' | where isnull(tags.costCenter) or tostring(tags.costCenter) == '' | project subscriptionId, name" -o table
The CFO wants: "If any Landing Zone's monthly spending exceeds its budget by 20%, we know about it the same day, and new resource creation is automatically blocked." Based on what the official features can do, what can and cannot be achieved? How would you design it?
The "same day" requirement cannot be met: cost data is delayed by 8–24 hours and budgets are evaluated every 24 hours, so notifications may arrive one to two days late. Budgets also do not block resources. A workable design: ① a subscription budget with a 120% actual threshold → action group → Logic App / Function, which assigns the subscription a "deny new resource creation" policy (similar to the effect of a decommissioned management group) or notifies the on-call engineer; ② a forecast threshold at 100% for early warning; ③ for real-time needs, use an SKU allow-list policy, quotas and resource-level metric alerts to fill the gap; ④ create budgets automatically when subscriptions are vended (hour 6). Also agree with the CFO that this is a "slow brake".
Verified teaching videos
Official documentation
Video storyboard script (about 90 seconds)
This course material cannot generate a video or MP3 directly. A storyboard and narration script are provided for use with a video tool.
On screen: a daily cost bar chart with a budget line across the top; on day 12, one bar suddenly grows tall.
Narration: Budgets are evaluated once a day and the data is still delayed, so alerts always arrive a little late.
On screen: usage record cards fly past, and the cost center tag from the resource group is "stamped" onto each card, but the resources themselves do not change.
Narration: Tag inheritance only applies to usage records. Tags on resources still need policies.
On screen: three rings loop: Inform, Optimize, Operate. The platform, application and finance teams stand in different positions.
Narration: FinOps makes each team accountable for its own usage, and the platform team's job is to make the data timely and accurate.
Module 7 · Activity logs, diagnostic settings and platform auditing
- Tell apart the Activity log (control plane), resource logs (data plane, which need diagnostic settings), Entra logs (tenant level) and the workspace's own query audit logs.
- Understand the coverage differences between subscription-level and management group-level diagnostic settings, where duplicate events come from, and why ALZ uses
Deploy-AzActivity-Logto configure export on each subscription. - Know how
Deploy-Diag-LogsCat(the allLogs category group) sends PaaS resource logs to the central workspace in a uniform way, and the cost considerations. - Be able to answer audit questions with KQL: who deleted a resource, who changed a role assignment, and which requests were denied by policy.
What: four kinds of audit-related logs
| Log | What it records | Default retention | How to centralize |
|---|---|---|---|
| Activity log | Control plane write operations (create, update, delete, actions), policy events, service and resource health, alerts, autoscale and so on; read operations are usually not recorded | 90 days, free | Subscription-level diagnostic setting → AzureActivity table (no ingestion charge; only retention beyond 90 days is billed) |
| Resource logs | Data plane operations (reading Key Vault secrets, storage requests, firewall rule hits, ...) | Not collected by default | Resource-level diagnostic settings (ALZ: Deploy-Diag-LogsCat) |
| Entra ID logs | Sign-ins, audit, provisioning, etc. | Limited number of days in Entra | Tenant-level diagnostic settings in the Entra admin center (licensing requirements for exporting sign-in logs: check the official docs) |
| Workspace query audit | Who ran which query in the workspace (LAQueryLogs) | — | The workspace's own diagnostic settings |
Two important reminders from the official docs: ① The Activity log is not an authentication or authorization audit log. Requests that ARM rejects during authentication or authorization, before the operation starts, do not produce Activity log entries. ② The Activity log is the only place that records who created a resource, and by default it only keeps data for 90 days, so it must be exported. Entries are usually queryable 3–20 minutes after the event.
Why: subscription-level and management group-level diagnostic settings
- Subscription-level diagnostic setting: exports all Activity log categories for that subscription.
- Management group-level diagnostic setting: exports Activity log events for that management group and all the management groups beneath it. If you configure it at several levels, you get duplicate events; configuring one at the top level is enough to cover management group events.
- Key difference: ARM writes subscription events with a
hierarchyproperty, and subscription events with this property propagate up to management group diagnostic settings. Events written by resource providers outside ARM do not have this property and do not propagate, so you won't receive them even if you configure the root management group. The official guidance is therefore to keep a subscription-level diagnostic setting on every subscription you want to monitor. Exporting to the same destination creates duplicates, which you remove by hashing.
This is how ALZ works. The Deploy-AzActivity-Log on the intermediate root alz is the built-in policy "Configure Azure Activity logs to stream to specified Log Analytics workspace" (2465583e-…, mode All, DINE, existence scope at the subscription level, parameters logAnalytics and logsEnabled, required roles Monitoring Contributor and Log Analytics Contributor). It ensures every subscription placed in the hierarchy has a subscription-level diagnostic setting pointing to the central workspace, and if you delete that setting, it is restored (Hour 1 mentioned this "cannot be deleted" behavior).
How: resource logs and Deploy-Diag-LogsCat
Deploy-Diag-LogsCat= built-in policy set0884adba-…"Enable allLogs category group resource logging for supported resources to Log Analytics", assigned onalzwith the parameterlogAnalytics. For many resource types, it deploys a diagnostic setting that uses the allLogs category group.- allLogs means "all log categories for that resource", including very verbose categories (for example, storage reads and writes, or firewall rule hits). This is one of the biggest cost drivers. Use the
Usagequery from Module 1 to keep an eye on it, and where needed, switch specific resource types to theauditcategory group in IaC, or filter with a workspace transformation DCR. - Each resource can have up to 5 diagnostic settings. Sending the same category to the same destination is rejected, which prevents manual settings from duplicating policy settings.
- New direction: the official docs now offer DCR-based platform log collection (preview) and metric export. For resource types that are not supported, keep using diagnostic settings.
When: questions that platform auditing needs to answer
| Question | Data source | Table |
|---|---|---|
| Who deleted this resource group? | Activity log (Administrative) | AzureActivity |
| Who assigned Owner to whom, and when? | Activity log (roleAssignments/write) | AzureActivity |
| Which deployments were denied by policy? | Activity log (Policy category) | AzureActivity |
| Who read a Key Vault secret? | Resource logs | AzureDiagnostics or resource-specific tables |
| Who created a management group or subscription? | Tenant-level or management group-level Activity log | AzureActivity exported from management group diagnostic settings |
| Who queried the security logs? | Workspace query audit | LAQueryLogs |
- "Configure one diagnostic setting on the root management group and you collect the Activity log of every subscription" — Subscription events without the
hierarchyproperty do not propagate, so subscription-level settings are still needed. - "The Activity log shows every failed sign-in and unauthorized request" — Requests rejected during authentication or authorization do not create entries; sign-in auditing is in the Entra logs.
- "Sending the Activity log to a workspace is expensive" — The Activity log has no ingestion charge; only retention beyond 90 days is billed.
- "allLogs is just the audit log" — It includes all categories for the resource, and can be very verbose.
Coverage diagram: where an event ends up
Interactive checker: how many times this event gets exported
Turn three types of diagnostic settings on or off, then "trigger" five events one by one. The checker uses the official "Export management group activity logs" rules to decide whether each one reaches the central workspace and whether it is duplicated.
Subscription-level diagnostic setting (ALZ does this with a policy; here it is for manual understanding)
LAW_ID=$(az monitor log-analytics workspace show -g $RG_MGMT -n $LAW --subscription $SUB_MGMT --query id -o tsv)
cat > diag-sub.json <<EOF
{ "properties": { "workspaceId": "$LAW_ID", "logs": [
{"category":"Administrative","enabled":true}, {"category":"Security","enabled":true},
{"category":"ServiceHealth","enabled":true}, {"category":"Alert","enabled":true},
{"category":"Recommendation","enabled":true}, {"category":"Policy","enabled":true},
{"category":"Autoscale","enabled":true}, {"category":"ResourceHealth","enabled":true} ] } }
EOF
az rest --method put --body @diag-sub.json \
--url "https://management.azure.com/subscriptions/$SUB_APP/providers/Microsoft.Insights/diagnosticSettings/setbypolicy-lab?api-version=2021-05-01-preview"
az monitor diagnostic-settings subscription list --subscription $SUB_APP -o table
Management group-level diagnostic setting
az rest --method put \
--url "https://management.azure.com/providers/Microsoft.Management/managementGroups/alz/providers/Microsoft.Insights/diagnosticSettings/mg-alz-to-law?api-version=2020-01-01-preview" \
--body "{\"properties\":{\"workspaceId\":\"$LAW_ID\",\"logs\":[{\"category\":\"Administrative\",\"enabled\":true},{\"category\":\"Policy\",\"enabled\":true}]}}"
The categories available for management group diagnostic settings depend on the API reference (commonly Administrative and Policy). If you export to the same workspace as a subscription-level setting, you will get duplicate events.
Resource-level diagnostic setting (allLogs category group)
KV_ID=/subscriptions/$SUB_APP/resourceGroups/$RG_APP/providers/Microsoft.KeyVault/vaults/<kv-name>
az monitor diagnostic-settings categories list --resource $KV_ID --query "value[].{name:name, type:categoryType}" -o table
az monitor diagnostic-settings create -n diag-kv-to-law --resource $KV_ID --workspace $LAW_ID \
--logs '[{"categoryGroup":"audit","enabled":true}]' --metrics '[{"category":"AllMetrics","enabled":true}]'
Audit KQL
// 1) Who deleted a resource group (last 30 days) AzureActivity | where TimeGenerated > ago(30d) | where OperationNameValue =~ "MICROSOFT.RESOURCES/SUBSCRIPTIONS/RESOURCEGROUPS/DELETE" and ActivityStatusValue =~ "Success" | project TimeGenerated, Caller, CallerIpAddress, ResourceGroup, SubscriptionId // 2) Role assignment changes AzureActivity | where OperationNameValue =~ "MICROSOFT.AUTHORIZATION/ROLEASSIGNMENTS/WRITE" and ActivityStatusValue =~ "Success" | extend scope = tostring(parse_json(Properties).entity) | project TimeGenerated, Caller, scope // 3) Requests denied by policy (Policy category) AzureActivity | where CategoryValue =~ "Policy" and OperationNameValue has "deny" | summarize count() by Caller, ResourceGroup, bin(TimeGenerated, 1d) // 4) Deduplicate when events are exported from both the management group and the subscription (official example) AzureActivity | extend Hash = hash(dynamic_to_json(pack_all())) | summarize arg_max(TimeGenerated, *) by Hash
Field values in AzureActivity may not have consistent casing, so the official guidance is to compare them with =~ or tolower().
Lab 7: Find out "who deleted it" (about 20 minutes)
az monitor diagnostic-settings subscription list --subscription $SUB_APP -o table should show the setting deployed by ALZ (the name usually starts with setbypolicy). If it is not there, create one manually on the "Commands" tab, or create a remediation task for Deploy-AzActivity-Log.rg-lz-myapp-cc, create and then delete a small resource other than a public IP (for example, an empty NSG), then try to create a NIC with a public IP to trigger a Deny.Deploy-AzActivity-Log redeploys it.alz, then create a policy assignment on corp. Use KQL 4 to observe the duplicates and how they are removed.AzureActivity retention according to your compliance requirements (Module 1).Case 1: During an incident review, the Activity log had already "expired"
Problem: A resource group was deleted 4 months ago, and it cannot be found in the portal when accountability is being determined. Cause: The Activity log only keeps 90 days, and that subscription was created outside ALZ, so it had no diagnostic setting. Fix: Place the subscription in the hierarchy, and Deploy-AzActivity-Log adds the export automatically. Set the AzureActivity total retention to 2 years. The subscription vending process places new subscriptions in the ALZ hierarchy by default.
Case 2: Half of the log bill comes from allLogs
Problem: The allLogs diagnostic logs for storage accounts and firewalls made up 60% of workspace ingestion. Fix: For storage accounts, collect only the audit category group (overriding the effect of Deploy-Diag-LogsCat through IaC, or with a separate assignment). Put the firewall's structured log tables on the Basic plan, and use a workspace transformation DCR to filter out health probe records. Lesson: "Collect everything" is a default, not a final answer.
Case 3: The root management group diagnostic setting "missed events"
Problem: The security team configured a diagnostic setting only on the root management group, and found that some health and resource provider events from some subscriptions were missing from the SIEM. Cause: These events have no hierarchy property, so they do not propagate to the management group. Fix: Keep the subscription-level settings (ALZ's policy), and deduplicate by hash on the SIEM side.
Common errors and fixes
(Conflict) Data sink '…/workspaces/law-alz-mgmt-cc' is already used in diagnostic setting '…' for category 'Administrative' (check the exact error text in your environment)
Cause: A diagnostic setting for the same category already sends to the same destination (common when a manual setting duplicates a policy setting). Fix: Delete the manual setting and keep the one managed by policy.
A failed operation does not appear in the AzureActivity table
Cause: The request was rejected during authentication or authorization (for example, an invalid token or no RBAC permission), and the Activity log does not record it; or the event happened less than 20 minutes ago. Fix: Check the Entra sign-in logs, or wait and run the query again.
The same event appears twice in AzureActivity
Cause: The management group and subscription diagnostic settings both export to the same workspace, or several management group levels have settings. Fix: Keep only one management group setting, at the top level; deduplicate by hash in queries.
Deploy-Diag-LogsCat keeps reporting a resource type as non-compliant
Cause: The resource already has 5 diagnostic settings (the limit), or the resource type does not support the allLogs category group. Fix: Remove the extra diagnostic settings; for unsupported types, use specific categories.
The management group's Activity log page in the portal shows events, but the workspace does not
Cause: There is no management group-level diagnostic setting (subscription-level settings only export subscription events). Fix: Create a management group diagnostic setting on alz.
1. List the Activity log events from the last 7 days that occurred at the management group corp (without going through the workspace).
START=$(date -u -d '-7 days' +%Y-%m-%dT%H:%M:%SZ); END=$(date -u +%Y-%m-%dT%H:%M:%SZ)
FILTER=$(jq -rn --arg f "eventTimestamp ge '$START' and eventTimestamp le '$END'" '$f|@uri')
az rest --method get --url "https://management.azure.com/providers/Microsoft.Management/managementGroups/corp/providers/Microsoft.Insights/eventtypes/management/values?api-version=2017-03-01-preview&\$filter=$FILTER" \
--query "value[].{time:eventTimestamp, op:operationName.value, caller:caller}" -o table2. Find the Key Vaults in the subscription that have no diagnostic settings at all.
for id in $(az keyvault list --query "[].id" -o tsv); do n=$(az monitor diagnostic-settings list --resource $id --query "length(value)" -o tsv) [ "$n" = "0" ] && echo "Missing diagnostic setting: $id" done
Audit requirements: keep all control plane operations for 7 years, keep Key Vault secret access for 1 year, and make every query against the security logs traceable. The budget is limited. How would you design this?
① AzureActivity: send it to the central workspace through Deploy-AzActivity-Log (no ingestion charge). Set the table's total retention to 7 years (the CLI limit is 2,556 days, which is about 7 years; use REST for longer), keep 90 days of analytics retention, and move the rest to low-cost long-term retention. Also add a management group diagnostic setting on alz to cover management group events. ② Key Vault: Deploy-Diag-LogsCat only needs the audit category group, and the corresponding table's total retention is set to 1 year. ③ Turn on query auditing (LAQueryLogs) in the workspace's own diagnostic settings, retained for 1–7 years. ④ If immutable storage is needed, also export the Activity log to a storage account with an immutability policy. Cost control: long-term retention is billed per GB at a low price, so avoid keeping verbose allLogs for 7 years as well.
Verified teaching videos
No verified video specifically covering "management group diagnostic settings and hierarchy propagation" was found, so a storyboard script is provided below.
Official documentation
- Activity log in Azure Monitor
- Diagnostic settings in Azure Monitor
- Activity log event schema (categories)
Video storyboard script (about 90 seconds)
This course material cannot generate a video or MP3 directly. A storyboard and narration script are provided for use with a video tool.
On screen: a resource group is deleted, a record appears in the Activity log, and beside it a 90-day hourglass starts running.
Narration: The Activity log records who changed what, but it only keeps ninety days.
On screen: events in the subscription come in two colors. Those with the hierarchy property float up to the management group; those without it stay in the subscription.
Narration: Only events with the hierarchy property propagate to the management group diagnostic setting, so the subscription-level setting cannot be skipped.
On screen: the same event enters the workspace through two pipelines, so there are now two copies; a hash function merges them into one.
Narration: If both levels export, you get duplicates, so remove them with a hash.
Module 8 · Management review and common errors
- Use a 14-item management review checklist to check whether the Landing Zone is observable, alertable, recoverable, auditable and billable.
- Use Resource Graph and KQL to calculate key coverage figures: AMA onboarding rate, heartbeat coverage, backup coverage, diagnostic setting coverage and budget coverage.
- Identify the 10 most common errors in the ALZ management design area, and their root causes.
- Use the interactive troubleshooting tree to locate problems such as "no logs", "no alerts", "no backups" and "no patch data".
What: management review checklist (14 items)
| # | Checklist item | Pass criteria | Module |
|---|---|---|---|
| 1 | Central workspace | One operations workspace in the management subscription; splitting it requires a documented reason (residency, security or tenancy) | M1 |
| 2 | Access control | Default is "use resource or workspace permissions"; sensitive tables use fine-grained RBAC or restricted tables; changes require approval | M1 |
| 3 | Retention and table plans | Total retention of audit tables meets compliance; verbose tables use Basic or Auxiliary plans; daily caps have alerts | M1 |
| 4 | AMA onboarding rate | ≥ 98% of VMs under platform and landingzones have AMA and a VM Insights DCRA | M2 |
| 5 | Legacy agents cleared | No Direct Agent category in Heartbeat | M2 |
| 6 | Shared identity protection | The AMA's UAMI is protected by DenyAction; DCR changes go through a pull request | M2 |
| 7 | Baseline alerts | AMBA (or equivalent) policy set assigned; notification assets exist; dev and test excluded or noise-reduced | M3 |
| 8 | Alerts reachable | Sev0–1 goes to the on-call system; the service health alert is deployed only once | M3 |
| 9 | Defender plans | Each subscription's plans match the agreement for its subscription type; security contacts and continuous export exist | M4 |
| 10 | Patching | Periodic assessment enabled; production VMs have maintenance configurations; Customer Managed Schedules set | M5 |
| 11 | Backup | 100% of production VMs have protected items; vaults are hardened (soft delete, immutability); backup alerts are reachable | M5 |
| 12 | Budgets | Each application subscription has a monthly budget and an action group; management group budgets use the same currency | M6 |
| 13 | Tags and allocation | Untagged costs < 5%; platform cost allocation rules agreed | M6 |
| 14 | Auditing | Every subscription has an Activity log export; the top-level management group has a diagnostic setting; AzureActivity retention meets compliance | M7 |
Why: the ten most common errors
- One workspace per application: queries and alerts become fragmented, and you can't reach committed tiers. The official principle is to start with one.
- Assigned but never remediated: DINE does not automatically fix existing resources. After subscriptions are moved in, the remediation task gets forgotten.
- Missing cross-subscription permissions: the policy's managed identity has no rights over the UAMI or DCR in the management subscription, so remediation fails.
- Thinking AMBA needs no data: VM log alerts depend on VM Insights. Without a DCRA, there are no alerts.
- Notification storms: dev subscriptions are not excluded and every severity goes to the same mailbox, so real Sev1 alerts get drowned out.
- Reading the library, not the parameters: assuming ALZ enables all Defender plans by default.
- Thinking assessment equals patching:
Enable-AUM-CheckUpdatesonly looks and does not install. - Vault sprawl:
Deploy-VM-Backupcreates a new vault for each resource group, with no hardening or exclusion policy. - Treating budgets as a brake: budgets only send notifications, and they have a 1–2 day delay.
- Exporting Activity logs only at the root management group: misses subscription events without a
hierarchyproperty, or multi-level exports cause duplicates.
How: coverage thinking
Most failures in the management plane are "silent gaps": no data, no alerts, no backups, rather than errors. So the core of the review is coverage: compare what should be managed (the resource inventory from Resource Graph) with what is actually managed (heartbeats in the workspace, protected items in the vault, the diagnostic setting list, the budget list). The difference is the risk list.
When: review cadence
- At every subscription onboarding, at every ALZ library upgrade (hour 6), and with a full review every quarter.
- Turn the coverage queries into a workbook or a scheduled log alert, so that the review becomes continuous.
- More in-depth troubleshooting (DINE remediation permission failures, compliance delays, conflicts between multiple assignments) is covered in Hour 7.
- "100% policy compliance means management is in good shape" — Compliance only means "done as parameterized"; the parameters might be Disabled or placeholder values.
- "No alerts means no problems" — First confirm that the alerts have data to evaluate.
- "The review is a one-time project" — New subscriptions, new resource types and library upgrades all change the coverage.
Review data flow: should vs. actual
Interactive scorer: run a management review on your Landing Zone
Tick the items that are met. The scorer calculates a weighted total score and lists the to-dos sorted by risk. The weights are teaching suggestions in this course, not an official algorithm.
Coverage queries (Resource Graph + workspace)
# ① Total VMs under landingzones and the number with AMA installed
az graph query --management-groups landingzones -q "resources
| where type =~ 'microsoft.compute/virtualmachines'
| extend vmId = tolower(id)
| join kind=leftouter (resources | where type =~ 'microsoft.compute/virtualmachines/extensions'
| where name in~ ('AzureMonitorLinuxAgent','AzureMonitorWindowsAgent')
| extend vmId = tolower(substring(id, 0, indexof(id, '/extensions/'))) | project vmId, ama = 1) on vmId
| summarize total = count(), withAma = countif(ama == 1)" -o table
# ② Subscriptions without a subscription-level Activity log diagnostic setting (check one by one)
for s in $(az account list --query "[?state=='Enabled'].id" -o tsv); do
n=$(az monitor diagnostic-settings subscription list --subscription $s --query "length(value)" -o tsv 2>/dev/null)
[ "${n:-0}" = "0" ] && echo "Missing Activity log export: $s"
done
# ③ Defender for Servers plan for each subscription
az graph query -q "securityresources | where type == 'microsoft.security/pricings' and name == 'VirtualMachines'
| project subscriptionId, tier = properties.pricingTier, sub = properties.subPlan" -o table
# ④ Backup coverage: VMs under landingzones and their protected items
az graph query --management-groups landingzones -q "recoveryservicesresources
| where type =~ 'microsoft.recoveryservices/vaults/backupfabrics/protectioncontainers/protecteditems'
| summarize protected = dcount(tolower(tostring(properties.sourceResourceId)))" -o table
// ⑤ Heartbeat coverage (workspace side): number of VMs with a heartbeat in the last hour Heartbeat | where TimeGenerated > ago(1h) | summarize by _ResourceId, Category | summarize vms = dcount(_ResourceId) by Category
Total WithAma ------- --------- 42 39 Category vms ------------------- ---- Azure Monitor Agent 38 Direct Agent 1
Interpreting the results: of 42 VMs, 39 have AMA installed, but only 38 are reporting (one may lack a DCRA or have no network connectivity), and 1 still has the legacy MMA. These 4 are the to-dos for the review.
Policy side: summary of non-compliance for management-related assignments
for a in Deploy-VM-Monitoring Deploy-VM-ChangeTrack Enable-AUM-CheckUpdates Deploy-VM-Backup Deploy-AzActivity-Log Deploy-Diag-LogsCat Deploy-MDFC-Config-H224; do
echo "== $a"
az policy state summarize --management-group alz --filter "policyAssignmentName eq '$a'" \
--query "results.nonCompliantResources" -o tsv
done
Lab 8: An end-to-end management review (about 30 minutes)
az policy state list --filter "complianceState eq 'NonCompliant'").Case 1: The review found that 12% of VMs were "invisible"
Problem: The coverage query at a manufacturing company showed that 36 of 300 VMs had no heartbeat. Causes: 20 VMs were not fixed after their subscription was moved in; 9 were on a private network without DNS resolution to the ingestion endpoints (missing AMPLS private DNS); 5 were on the legacy MMA; 2 had been powered off for a long time. Fix: Handle each group separately with remediation tasks, the private DNS design from the networking course, and the MMA removal tool. Tag the powered-off VMs to exclude them from the coverage denominator.
Case 2: Quarterly review becomes continuous review
Problem: Each quarter, the manual review took two weeks, and the results were out of date as soon as they came out. Fix: Turn the 10 automatable items of the 14-item checklist into an Azure workbook plus daily log alerts (open a ticket when coverage falls below the threshold). Only 4 items stay as a manual quarterly review: access control, allocation rules, retention compliance and so on.
Case 3: Management plane regresses after a library upgrade
Problem: After upgrading the ALZ library, one DINE assignment was replaced by a new version (new assignment name, new managed identity). The old role assignments stopped working, and the remediation failed for a week without anyone noticing. Fix: Add a "remediation smoke test for management-related assignments" to the library upgrade process (create a temporary VM and verify AMA, DCRA, assessment mode and backup within 30 minutes). See the version upgrade in Hour 6.
Interactive troubleshooting tree: what's missing in the management plane
Start from a symptom, answer the questions step by step, and get diagnostic commands and fix suggestions.
Supplement: quick reference for error messages
(RequestDisallowedByPolicy) … policyAssignmentName: DenyAction-DeleteUAMIAMA
See Module 2: update all assignments that reference this UAMI first, then create an exemption on the resource, and then delete it.
Remediation task status is Failed, with an error containing AuthorizationFailed or LinkedAuthorizationFailed
The assignment's managed identity lacks a role on the target or on the "referenced resource" (UAMI, DCR, workspace). Regenerate the role assignment with IaC, or grant it manually using the defined roleDefinitionIds.
Workspace banner shows that the daily cap has been reached
See Module 1: find the table whose volume spiked, filter it or adjust the cap, and set an alert for the cap (_LogOperation | where Category =~ "Ingestion" | where Detail contains "OverQuota").
1. List machines that had a heartbeat in the last 24 hours but have not had one in the last 15 minutes (they may have just gone down).
Heartbeat | where TimeGenerated > ago(24h) | summarize Last = max(TimeGenerated) by Computer, _ResourceId | where Last < ago(15m) | order by Last asc
2. Summarize the number of non-compliant subscriptions for Deploy-AzActivity-Log under the alz management group.
az policy state summarize --management-group alz \ --filter "policyAssignmentName eq 'Deploy-AzActivity-Log'" \ --query "results.nonCompliantResources"
You take over an ALZ environment that has been running for two years, and the CIO gives you one week to "confirm the operations baseline is reliable". What order would you check things in, and why?
Order by the impact of silent gaps: ① Activity log export and retention (audit evidence cannot be recovered once it expires); ② backup coverage and vault hardening (data loss is irreversible); ③ heartbeat and AMA coverage (these determine whether alerts have data); ④ alert reachability (whether Sev0–1 alerts can reach the on-call engineer); ⑤ Defender plans and security contacts; ⑥ patch assessment and maintenance configurations; ⑦ budgets and allocation; ⑧ workspace access control and retention settings. Give evidence for each item with "should vs. actual" queries, and finally produce the 14-item checklist and an improvement plan.
Verified teaching videos
Official documentation
Video storyboard script (about 90 seconds)
This course material cannot generate a video or MP3 directly. A storyboard and narration script are provided for use with a video tool.
On screen: two lists side by side: on the left "42 VMs that should be managed", on the right "38 reporting". The 4 missing ones turn red.
Narration: Most management-plane failures are silent gaps, so the review must compare what should be there with what actually is.
On screen: ten error cards flip over one by one: create without remediation, cross-subscription authorization, notification storms, and so on.
Narration: Almost all of the ten most common errors can be caught early with a single query.
On screen: the review changes from "once a quarter" on the calendar to a coverage figure that keeps moving on the dashboard.
Narration: Turn the review into continuous alerts and workbooks, and the baseline stays reliable.
Command cheat sheet
az monitor log-analytics workspace create -g rg-alz-mgmt-cc -n law-alz-mgmt-cc -l canadacentral --sku PerGB2018 --retention-time 30 --quota 1 az monitor log-analytics workspace show -g rg-alz-mgmt-cc -n law-alz-mgmt-cc --query features.enableLogAccessUsingOnlyResourcePermissions az monitor log-analytics workspace table update -g rg-alz-mgmt-cc --workspace-name law-alz-mgmt-cc -n AzureActivity --retention-time 90 --total-retention-time 730 az monitor log-analytics workspace table list -g rg-alz-mgmt-cc --workspace-name law-alz-mgmt-cc -o table
az identity create -g rg-alz-mgmt-cc -n id-alz-ama-cc az monitor data-collection rule create -g rg-alz-mgmt-cc -n dcr-vm-insights-cc --rule-file dcr-vmi.json az vm identity assign -g <rg> -n <vm> --identities <uami-id> az vm extension set -g <rg> --vm-name <vm> -n AzureMonitorLinuxAgent --publisher Microsoft.Azure.Monitor --enable-auto-upgrade true --settings '…mi_res_id…' az monitor data-collection rule association create --name dcra-vmi --resource <vm-id> --rule-id <dcr-id> az policy remediation create --name rem-vmi --management-group landingzones --policy-assignment <assignment-id> --definition-reference-id <ref>
az monitor action-group create -g rg-alz-amba-cc -n ag-alz-ops-cc --short-name alzops --action email oncall oncall@contoso.example az monitor alert-processing-rule create -g rg-alz-amba-cc -n apr-alz-ops-cc --rule-type AddActionGroups --action-groups <ag-id> --scopes /subscriptions/<sub> az monitor alert-processing-rule create -g rg-alz-amba-cc -n apr-maint --rule-type RemoveAllActionGroups --scopes <scope> --schedule-start-datetime "…" --schedule-end-datetime "…" az monitor metrics alert create -g rg-alz-amba-cc -n alert-vm-cpu --scopes <vm-id> --condition "avg Percentage CPU > 85" --window-size 15m --evaluation-frequency 5m --severity 2 --action <ag-id>
az security pricing list -o table az security pricing create -n VirtualMachines --tier standard --subplan P1 az security secure-scores list -o table az policy assignment show --name Deploy-MDFC-Config-H224 --scope /providers/Microsoft.Management/managementGroups/alz --query parameters
az vm assess-patches -g <rg> -n <vm> az vm install-patches -g <rg> -n <vm> --maximum-duration PT2H --reboot-setting IfRequired --classifications-to-include-linux Critical Security az maintenance configuration create -g <rg> --resource-name mc-lz-weekly-cc --maintenance-scope InGuestPatch … az maintenance assignment create -g <rg> --name mca-x --maintenance-configuration-id <mc-id> --provider-name Microsoft.Compute --resource-type virtualMachines --resource-name <vm> az backup item list -g <rg> -v <vault> --backup-management-type AzureIaasVM -o table
az rest --method put --url ".../subscriptions/<sub>/providers/Microsoft.Consumption/budgets/<name>?api-version=2023-11-01" --body @budget.json
az rest --method get --url ".../subscriptions/<sub>/providers/Microsoft.Consumption/budgets?api-version=2023-11-01"
az rest --method post --url ".../subscriptions/<sub>/providers/Microsoft.CostManagement/query?api-version=2023-11-01" --body '{…grouping TagKey costCenter…}'az monitor diagnostic-settings subscription list --subscription <sub> -o table
az monitor diagnostic-settings categories list --resource <resource-id> -o table
az monitor diagnostic-settings create -n diag-x --resource <resource-id> --workspace <law-id> --logs '[{"categoryGroup":"audit","enabled":true}]'
az monitor activity-log list --offset 7d --max-events 50 -o tableaz graph query --management-groups landingzones -q "resources | where type =~ 'microsoft.compute/virtualmachines' | count" az policy state summarize --management-group alz --filter "policyAssignmentName eq 'Deploy-VM-Monitoring'" az policy state trigger-scan --resource-group <rg>
Common KQL
Heartbeat | summarize Last = max(TimeGenerated) by Computer, Category, _ResourceId // Agent check-in Usage | where TimeGenerated > ago(7d) and IsBillable | summarize GB = sum(Quantity)/1000 by DataType // Who is spending money _LogOperation | where Category =~ "Ingestion" | where Detail contains "OverQuota" // Daily cap AzureActivity | where OperationNameValue =~ "MICROSOFT.AUTHORIZATION/ROLEASSIGNMENTS/WRITE" // Role assignment changes AzureActivity | extend Hash = hash(dynamic_to_json(pack_all())) | summarize arg_max(TimeGenerated, *) by Hash // Deduplication SecurityRecommendation | where RecommendationState == "Unhealthy" | summarize dcount(AssessedResourceId) by RecommendationDisplayName
Key numbers
| Topic | Number | Source |
|---|---|---|
| Workspace analytics retention | Default 30 days; maximum 730 days; minimum 4 days; the first 31 days are included in the ingestion price | Manage data retention |
| Total retention | Maximum 4,383 days (12 years); CLI up to 2,556 days; after shortening, data is deleted only after 30 days | Same as above |
| Free 90-day tables | Usage, AzureActivity (with no ingestion charge) | Same as above |
| Dedicated cluster | Consider when ingestion is ≥ 100 GB per day | Workspace design |
| MMA | Retired 2024-08-31; uploads after 2026-03-02 may stop at any time | Agent migration |
| AMBA VM heartbeat / CPU | Sev1, >10 minutes, PT5M / PT6H; Sev2, >85%, PT5M / PT15M | ALZ library platform/amba |
| Alert processing rules | Takes effect up to 30 minutes after creation; suppression takes precedence over adding; does not affect service health alerts | Alert processing rules |
| Secure Score | Controls are calculated every 8 hours; preview recommendations are not scored | Secure score |
| Update Manager | Periodic assessment every 24 hours; window maximum 3 hours 55 minutes; 250 schedules per subscription per region; 3,000 associations per schedule | Scheduled patching |
| Budgets | Data delay 8–24 hours; evaluated every 24 hours; up to 5 thresholds and 5 email addresses; thresholds 0.01%–1000% | Create budgets |
| Tag inheritance | Takes effect in 8–24 hours; applies to usage records for the current month | Tag inheritance |
| Activity log | Retained 90 days; queryable 3–20 minutes after the event | Activity log |
Capstone lab + final quiz
Scenario
myapp (Flask, port 5000) is already running on a test VM in sub-lz-corp-myapp (hour 4). Before go-live, the operations lead requires: ① VM logs and performance data go to the central workspace, and the application team can only see its own data; ② the on-call engineer is notified within 10 minutes of an outage, without being disturbed during the maintenance window; ③ security patches are installed automatically every week, and backups run every day; ④ a monthly budget of $300, with a notification at 80%; ⑤ all changes over the next six months are traceable; ⑥ deliver a 14-item review report.
law-alz-mgmt-cc uses the default access control mode; Heartbeat analytics retention is 90 days and AzureActivity total retention is ≥ 180 days; set a daily cap and a cap alert.Deploy-VM-Monitoring (or an equivalent assignment) and remediation tasks to give the VMs a UAMI, AMA and a VM Insights DCRA. Verify with the application team's identity, in the resource context, that they can only see myapp's records.ag-alz-ops-cc; heartbeat log alert (10 minutes, Sev1) and CPU alert (85%, Sev2); an additive alert processing rule; a suppression rule for Saturday 02:00–04:00.Deploy-VM-Backup, then trigger one on-demand backup:
az backup protection backup-now -g $RG_APP -v $VAULT --container-name <container> --item-name <item> \ --backup-management-type AzureIaasVM --retain-until 25-11-2026
costCenter.az account set -s $SUB_APP az backup protection disable -g $RG_APP -v $VAULT --container-name <container> --item-name <item> \ --backup-management-type AzureIaasVM --delete-backup-data true --yes az maintenance assignment delete -g $RG_APP --name mca-myapp --provider-name Microsoft.Compute \ --resource-type virtualMachines --resource-name $VM --yes az group delete -n $RG_AMBA --yes --no-wait az security pricing create -n VirtualMachines --tier free # If you turned it on during the lab # If the test VM is no longer needed: az vm delete -g $RG_APP -n $VM --yes (otherwise DINE will deploy backup again) az account set -s $SUB_MGMT # If the workspace, UAMI and DCR are not needed for later hours: az group delete -n $RG_MGMT --yes --no-wait # Note: DenyAction will block deleting the UAMI; first grant an exemption or remove the assignment # Finally: revoke the elevated access on the root management group
Acceptance checklist
Open-ended self-check (6 questions)
1. In what situations would you agree to merge the operations workspace with the Sentinel workspace?
Merging can reach a higher commitment tier (official example: two workspaces at 50 GB/day each, merged, qualify for the 100 GB/day tier). Choose this only if the security team accepts isolating security data with table-level or fine-grained RBAC, and accepts that the whole workspace is billed at Sentinel prices. Otherwise keep them separate and have Defender and Sentinel share the security workspace.
2. Why does ALZ use one cross-subscription UAMI for the AMA on all VMs, instead of a system-assigned identity? What is the cost?
Scale and control: one identity, a small permission surface, and VM rebuilds do not affect it. The cost is a critical single point of failure. It needs DenyAction protection, the policy's managed identity needs assign permission on it (cross-subscription authorization), and if it is deleted, every VM must be remediated again.
3. Describe every component that an AMBA VM CPU alert depends on, from data to notification.
AMA + VM Insights DCR + DCRA (data) → InsightsMetrics in the central workspace → log search alert rule deployed in the subscription by Deploy-AMBA-VM (with a managed identity that reads via ARG and filters MonitorDisable) → fired alert → alert processing rule apr-AMBA adds ag-AMBA (or a BYO action group) → email / webhook. If any link is missing, it fails silently.
4. Explain how "ALZ compliance rate 100%, but Defender for Servers is Free on every subscription" can happen.
In the library, the plan switch for Deploy-MDFC-Config-H224 defaults to Disabled. The policy only deploys security contacts and export based on parameters, so it reports as compliant. Check the parameter overrides in your IaC.
5. Why is configuring the activity log diagnostic setting only at the root management group not enough?
Only ARM events with a hierarchy property propagate to the management group setting. Events written directly by resource providers do not. So each subscription also needs a subscription-level setting (ALZ's Deploy-AzActivity-Log), and you accept duplicates and deduplicate them with a hash.
6. What problems do budget alerts, cost anomaly management, and SKU policies each solve?
Budgets: alert on trend and overspend within a period (1–2 days delayed, does not block). Anomaly management: detects unexpected spending patterns. SKU / resource type policies: block expensive or disallowed resources at request time. They are the only real-time cost guardrail.
Sources and versions
Source
| Topic | Source | Page date / version |
|---|---|---|
| ALZ management-related assignments, default values file, archetypes | Azure Landing Zones Library (platform/alz) | platform/alz/2026.11.0 (2026-11-06) |
| AMBA architecture, assignments, notification assets, VM alert defaults | ALZ Library platform/amba; Introduction to deploying the AMBA-ALZ pattern | platform/amba/2026.10.0 (2026-10-20); latest AMBA site release notes 2026-10-16 |
| Workspace design standards | Design a Log Analytics workspace architecture | 2026-05-27 |
| Access modes, access control modes, built-in roles, protected tables | Manage access to Log Analytics workspaces | 2026-09-02 |
| Fine-grained RBAC | Granular RBAC in Log Analytics | 2025-11-02 |
| Retention and billing | Manage data retention | 2026-09-02 |
| Table plan comparison | Azure Monitor Logs | 2026-09-02 |
| Daily cap and cap alerts | Set daily cap on Log Analytics workspace | 2025-08-29 |
| MMA retirement and migration tool | Log Analytics agent migration | 2026-10-22 |
| DCR and DCRA | Data collection rules in Azure Monitor | 2026-10-20 |
| Alert processing rules | Alert processing rules | 2026-04-24 |
| CSPM plans | What is CSPM | 2026-09-11 |
| Secure score | Cloud secure score | 2026-06-30 |
| Accelerator defaults for Defender plans | ALZ Accelerator: Turn off Defender Plans; alz-terraform-accelerator examples | Reviewed 2026-11-18 |
| Update Manager | Overview; Assessment options; Scheduled patching; Dynamic scoping | 2025-02-03 / 2024-12-06 / 2025-08-21 (all updated 2026-09-24) |
| Backup built-in policy 98d0b9f8 and AUM Modify definition | Azure/azure-policy built-in definitions | Backup 9.6.0; reviewed 2026-11-18 |
| Budgets | Create and manage budgets | 2025-06-26 |
| Tag inheritance | Tag inheritance | 2025-06-27 |
| FinOps Framework | FinOps Framework overview | 2025-04-25 (updated 2026-02-11) |
| Activity log and management group export | Activity log in Azure Monitor | 2026-11-03 |
| ALZ management module | Azure/avm-ptn-alz-management/azurerm | 0.10.0 (2026-10-27) |
Video verification notes
Every video link on the video tab was verified on 2026-11-18 through the YouTube oEmbed endpoint (https://www.youtube.com/oembed?url=…&format=json) for title and channel: tkNHafWEKKQ, lzVQ3NqMnTE, Z1zDlXCwI9k, xeuxetAfHRg, cHH4RkL-9Dg, rE-qgIgDCq8, LVmNh5YgBOQ, 8fvO3WArG-Y, YHUptdFtozQ, RjuTQvGm1zQ, FoBjC9CAF08, gzBXFnfvoXo, mluS8ovuBKg, R-5oeguxFpo. Most videos were recorded before this hour, so plan names, prices, retirement dates and limits follow this hour and the official docs. No verified video was found that covers Deploy-VM-Backup or hierarchy propagation for management group diagnostic settings. For those modules, a storyboard script is provided instead.
Voice notes
The Voice tab uses the browser's Web Speech API to read the narration aloud (English voice, en-US; terms are pronounced in 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 docs and CLI help, and were not run in a real tenant. Outputs (IDs, counts, times, scores) are examples.
az monitor data-collection,alert-processing-rule,scheduled-query,maintenance, andgraphare extension commands. Their parameters may change with extension versions, so check with-hbefore running. Budgets and management group diagnostic settings use REST, and API versions may be updated. - Error messages marked "verify against actual output" are examples compiled from official error types. The actual message includes more fields.
- The parameters and effects of the ALZ assignments come from library 2026.11.0 and the platform/amba defaults. Your deployment may already override them through IaC, especially the Defender plan switches, the AMBA resource groups, and the notification parameters.
- The ABAC condition expressions for fine-grained RBAC and the categories available for management group diagnostic settings follow the official API docs. This hour does not give specific prices for Update Manager billing for Arc servers, or for Defender and Log Analytics unit prices. Refer to the pricing pages.
- Animations and simulators are teaching models. Access decisions, maintenance windows, budget forecasts (linear simplification), secure score examples, and review weights are simplified illustrations. They do not reflect the internal implementation of the services.