|
2 | 2 | author: timwarner-msft
|
3 | 3 | ms.service: resource-graph
|
4 | 4 | ms.topic: include
|
5 |
| -ms.date: 07/07/2022 |
| 5 | +ms.date: 02/14/2023 |
6 | 6 | ms.author: timwarner
|
7 | 7 | ms.custom: generated
|
| 8 | +--- |
| 9 | +### Display all active Microsoft Defender for Cloud alerts |
| 10 | + |
| 11 | +Returns a list of all active alerts in your Microsoft Defender for Cloud tenant. |
| 12 | + |
| 13 | +```kusto |
| 14 | +securityresources |
| 15 | +| where type =~ 'microsoft.security/locations/alerts' |
| 16 | +| where properties.Status in ('Active') |
| 17 | +| where properties.Severity in ('Low', 'Medium', 'High') |
| 18 | +| project alert_type = tostring(properties.AlertType), SystemAlertId = tostring(properties.SystemAlertId), ResourceIdentifiers = todynamic(properties.ResourceIdentifiers) |
| 19 | +``` |
| 20 | + |
| 21 | +# [Azure CLI](#tab/azure-cli) |
| 22 | + |
| 23 | +```azurecli-interactive |
| 24 | +az graph query -q "securityresources | where type =~ 'microsoft.security/locations/alerts' | where properties.Status in ('Active') | where properties.Severity in ('Low', 'Medium', 'High') | project alert_type = tostring(properties AlertType), SystemAlertId = tostring(properties.SystemAlertId), ResourceIdentifiers = todynamic(properties ResourceIdentifiers)" |
| 25 | +``` |
| 26 | + |
| 27 | +# [Azure PowerShell](#tab/azure-powershell) |
| 28 | + |
| 29 | +```azurepowershell-interactive |
| 30 | +Search-AzGraph -Query "securityresources | where type =~ 'microsoft.security/locations/alerts' | where properties.Status in ('Active') | where properties.Severity in ('Low', 'Medium', 'High') | project alert_type = tostring(properties AlertType), SystemAlertId = tostring(properties.SystemAlertId), ResourceIdentifiers = todynamic(properties ResourceIdentifiers)" |
| 31 | +``` |
| 32 | + |
| 33 | +# [Portal](#tab/azure-portal) |
| 34 | + |
| 35 | +:::image type="icon" source="../../../../articles/governance/resource-graph/media/resource-graph-small.png"::: Try this query in Azure Resource Graph Explorer: |
| 36 | + |
| 37 | +- Azure portal: <a href="https://portal.azure.com/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/securityresources%20%7C%20where%20type%20%3D~%20%27microsoft.security%2Flocations%2Falerts%27%20%7C%20where%20properties.Status%20in%20%28%27Active%27%29%20%7C%20where%20properties.Severity%20in%20%28%27Low%27%2C%20%27Medium%27%2C%20%27High%27%29%20%7C%20project%20alert_type%20%3D%20tostring%28properties%20AlertType%29%2C%20SystemAlertId%20%3D%20tostring%28properties.SystemAlertId%29%2C%20ResourceIdentifiers%20%3D%20todynamic%28properties%20ResourceIdentifiers%29" target="_blank">portal.Azure.com</a> |
| 38 | +- Azure Government portal: <a href="https://portal.azure.us/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/securityresources%20%7C%20where%20type%20%3D~%20%27microsoft.security%2Flocations%2Falerts%27%20%7C%20where%20properties.Status%20in%20%28%27Active%27%29%20%7C%20where%20properties.Severity%20in%20%28%27Low%27%2C%20%27Medium%27%2C%20%27High%27%29%20%7C%20project%20alert_type%20%3D%20tostring%28properties%20AlertType%29%2C%20SystemAlertId%20%3D%20tostring%28properties.SystemAlertId%29%2C%20ResourceIdentifiers%20%3D%20todynamic%28properties%20ResourceIdentifiers%29" target="_blank">portal.Azure.us</a> |
| 39 | +- Azure China 21Vianet portal: <a href="https://portal.azure.cn/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/securityresources%20%7C%20where%20type%20%3D~%20%27microsoft.security%2Flocations%2Falerts%27%20%7C%20where%20properties.Status%20in%20%28%27Active%27%29%20%7C%20where%20properties.Severity%20in%20%28%27Low%27%2C%20%27Medium%27%2C%20%27High%27%29%20%7C%20project%20alert_type%20%3D%20tostring%28properties%20AlertType%29%2C%20SystemAlertId%20%3D%20tostring%28properties.SystemAlertId%29%2C%20ResourceIdentifiers%20%3D%20todynamic%28properties%20ResourceIdentifiers%29" target="_blank">portal.Azure.cn</a> |
| 40 | + |
8 | 41 | ---
|
9 | 42 |
|
10 | 43 | ### Controls secure score per subscription
|
|
0 commit comments