Forum Discussion
KrishhnaM
Nov 09, 2020Copper Contributor
Day/week/Time based Analytical (scheduled) rule in Azure Sentinel
Hi Community, I am currently working with a client on a certain requirement for detection of an office 365 message activity based on time and date. below business use case in detail Use ca...
GaryBushey
Nov 10, 2020Bronze Contributor
KrishhnaM You could use a dayofweek function to determine if it is a weekend or not and then and iif statement to handle different hour of the day processing.
- CliveWatsonNov 10, 2020
Microsoft
Some examples: https://techcommunity.microsoft.com/t5/azure-sentinel/how-to-align-your-analytics-with-time-windows-in-azure-sentinel/ba-p/1667574- User9864Jun 21, 2024Copper Contributor
CliveWatson
We defined a set of workspaces function for it.
for examplelet _get_day_name = (timestamp:datetime){tostring(dynamic(["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"])[toint(dayofweek(timestamp)/1d)]) } ; let _is_working_hours = (TimeGenerated: datetime, is_local_time:bool = false, timezone:string){ let local_time = iif(is_local_time , TimeGenerated , datetime_utc_to_local(TimeGenerated, timezone) ) ; get_day_name(local_time) !in("Sat", "Sun") and hourofday(local_time) between (8 .. 18) } ;