Lots of hygiene work, including cleaning up Azure Action Groups that send to individual emails. That’s a red flag and anti pattern.
Here’s the KQL to read the Action Groups, their subscriptions, and expand out the recipients.
It’s easy work to continue to audit this, and clean up the dead wood.
resources
| join kind=leftouter (ResourceContainers | where type==’microsoft.resources/subscriptions’ | project SubName=name, subscriptionId) on subscriptionId
| where type == “microsoft.insights/actiongroups”
| extend emailRecsCount =array_length(properties.emailReceivers)
| mv-expand emailRecs = properties.emailReceivers
| project SubName, resourceGroup, name, emailRecsCount, emailRecs.name, emailRecs.status, emailRecs.emailAddress
| order by [‘name’] asc
Recent Comments