@feelsLikeHome2020 Welcome to Microsoft Q & A Community Forum. I understand that you are trying to retrieve the list of alerts that are configured on the resources along with the actionGroups.
Here is a sample kusto query that will retreive the requested results.
Resources
| where type=='microsoft.insights/metricalerts'
| project name , type , resourceGroup , actionGroups = properties.actions ,scopes = properties.scopes
| mv-expand actionGroups
| extend actionGroupId = tostring(actionGroups.actionGroupId)
| join kind=inner (
Resources | where type == 'microsoft.insights/actiongroups'
| project actionGroupId= tostring(id), name, type , properties
) on actionGroupId
| project-away actionGroups , actionGroupId1 , name1 , type1
This query projects below information
- name : Name of the metric alert
- type : specifies the type of alert
- resourceGroup : resourceGroup of the alert where it exists
- scopes : list of resources where the alert is configured
- actionGroupId : Id of the action group that is linked to alert
- properties : contains the collections of notifications preferences.