Skip to content

Commit cc02a70

Browse files
authored
Merge pull request #4489 from austinmccollum/patch-2
Update arg usage
2 parents f7a7879 + 556144b commit cc02a70

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

defender-xdr/advanced-hunting-defender-use-custom-rules.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ For example, to get the first 10 rows of data from the `StormEvents` table store
6565
### Use arg() operator for Azure Resource Graph queries
6666
The `arg()` operator can be used to query across deployed Azure resources like subscriptions, virtual machines, CPU, storage, and the like.
6767

68-
This feature was previously only available in log analytics in Microsoft Sentinel. In the Microsoft Defender portal, the `arg()` operator works over Microsoft Sentinel data (that is, Defender XDR tables aren't supported). This allows users to use the operator in advanced hunting without needing to manually open a Microsoft Sentinel window.
68+
This feature was previously only available in the Logs feature in Microsoft Sentinel. In the Microsoft Defender portal, the `arg()` operator works to combine Azure Resource Graph (arg) queries with Microsoft Sentinel tables (that is, Defender XDR tables aren't supported). This allows users to make the cross-service query in advanced hunting without manually opening a Microsoft Sentinel window.
6969

70-
Note that queries using the `arg()` operator return the first 1,000 records only. Read [Query data in Azure Resource Graph by using arg()](/azure/azure-monitor/logs/azure-monitor-data-explorer-proxy#query-data-in-azure-resource-graph-by-using-arg-preview) for more details.
70+
For more information, see [Query data in Azure Resource Graph by using arg()](/azure/azure-monitor/logs/azure-monitor-data-explorer-proxy#query-data-in-azure-resource-graph-by-using-arg-preview).
7171

7272
In the query editor, enter *arg("").* followed by the Azure Resource Graph table name.
7373

@@ -78,14 +78,12 @@ For example:
7878
You can also, for instance, filter a query that searches over Microsoft Sentinel data based on the results of an Azure Resource Graph query:
7979

8080
```Kusto
81-
arg("").Resources
82-
| where type == "microsoft.compute/virtualmachines" and properties.hardwareProfile.vmSize startswith "Standard_D"
83-
| join (
84-
Heartbeat
85-
| where TimeGenerated > ago(1d)
86-
| distinct Computer
87-
)
88-
on $left.name == $right.Computer
81+
arg("").Resources
82+
| where type=="microsoft.compute/virtualmachines" | extend name = tolower(name)
83+
| join (
84+
BehaviorAnalytics
85+
| where isnotempty(SourceDevice) and InvestigationPriority > 2 | extend SourceDevice = tolower(SourceDevice)
86+
) on $left.name == $right.SourceDevice
8987
```
9088

9189

@@ -141,4 +139,4 @@ You can view all your user-defined rules—both custom detection rules and analy
141139

142140

143141
For multiworkspace organizations that have onboarded multiple workspaces to Microsoft Defender, you can now view the **Workspace ID** column and filter by workspace.
144-
142+

0 commit comments

Comments
 (0)