Accessible at https://policyinitiativebuilder.yellowbay-9c92f1d3.westeurope.azurecontainerapps.io/
policyresources
| where type == "microsoft.authorization/policyexemptions"
| project
id,
name,
tenantId,
resourceGroup,
subscriptionId,
policyAssignmentId = properties.policyAssignmentId,
displayName = properties.displayName,
description = properties.description,
category = properties.exemptionCategory,
properties
PolicyResources
| extend subscriptionId = tostring(properties.subscriptionId)
| join kind=leftouter (
ResourceContainers
| where type=='microsoft.resources/subscriptions'
| project subscriptionName=name, subscriptionId) on subscriptionId
| where type =~ 'Microsoft.PolicyInsights/PolicyStates'
| project
policyAssignmentName = properties.policyAssignmentName,
policy = properties.policyDefinitionReferenceId,
state = properties.complianceState,
effect = properties.policyDefinitionAction,
subscriptionId,
subscriptionName,
resourceGroup = properties.resourceGroup,
resourceType = properties.resourceType,
resourceId = properties.resourceId,
properties
| order by tostring(policyAssignmentName) desc, tostring(['state']) asc