At the moment the way I search SecurityEvent across all workspaces is to create a function that contains the following search syntax:
union
workspace("workspaceid1").SecurityEvent, workspace("workspaceid2").SecurityEvent, workspace("workspaceid3").SecurityEvent
|where ....
Are there any way we can utilize a Sentinel Watchlist/ a list, and then create like a for loop that will parse all the workspaceID inside the Watchlist into the search syntax, and then we can search SecurityEvent for all workspaces?
Because with the current method, whenever we have to add a new workspace, we have to add it into the code. Just wanted to know how we can better code this Kusto Language
Thank You.