Forum Discussion
gsutterfield
May 07, 2025Copper Contributor
Script or Query for Management Group Compliance Statistics
I've been trying to reproduce the Azure Portal Compliance statistics for a Management Group in a PowerShell script or Resource Graph query without much luck. What I'd like to do is reproduce the nu...
Kidd_Ip
Nov 23, 2026MVP
Yes, the closest match to the Azure Portal compliance blade is to use the Azure Policy Insights data source rather than trying to calculate compliance manually. Microsoft exposes the same compliance data used by the portal through PolicyStates and Policy State Summaries APIs. The compliance results are available at both subscription and management group scope.
https://learn.microsoft.com/en-us/azure/governance/policy/how-to/get-compliance-data