↳ GitHub sourceAnalytics ruleMedium
Dataverse - Anomalous application user activity
Description
Identifies anomalies in activity patterns of Dataverse application (non-interactive) users, based on activity falling outside the normal pattern of use.
- Rule type
- Scheduled
- Version
- 3.2.0
- Declared status
- Available
- Query frequency
- 5h
- Query period
- 14d
- Trigger
- gt 0
Declared MITRE coverage
Declared sources
Metadata from the source file. No dependencies inferred from KQL.
Connectors
Data types
KQL query
Original query, unchanged.
let query_lookback = 14d;
let query_frequency = 5h;
let anomaly_threshold = 2.5;
let seasonality = -1;
let trend = 'linefit';
let step_duration = 5h;
let app_user_regex = "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\\.com$";
let guid_regex = "([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12})";
let application_users = DataverseActivity
| where TimeGenerated >= ago(query_frequency)
| where UserId !endswith "@onmicrosoft.com" and UserId != "Unknown"
| summarize by UserId
| where split(UserId, "@")[1] matches regex app_user_regex;
DataverseActivity
| where TimeGenerated >= startofday(ago(query_lookback))
| where UserId in (application_users)
| where isnotempty(OriginalObjectId)
| make-series TotalEvents = count() default=0 on TimeGenerated from startofday(ago(query_lookback)) to now() step step_duration by UserId, InstanceUrl, OriginalObjectId
| extend (Anomalies, Score, Baseline) = series_decompose_anomalies(TotalEvents, anomaly_threshold, seasonality, trend)
| mv-expand
TotalEvents to typeof(double),
AnomalyTimeGenerated = TimeGenerated to typeof(datetime),
Anomalies to typeof(double),
Score to typeof(double),
Baseline to typeof(long)
| where Anomalies > 0
| extend Details = bag_pack(
"TotalEvents",
TotalEvents,
"Anomalies",
Anomalies,
"Baseline",
Baseline,
"Score",
Score,
"OriginalObjectId",
OriginalObjectId
)
| summarize Details = make_set(Details, 100) by UserId, InstanceUrl, AnomalyTimeGenerated
| extend
CloudAppId = int(32780),
AadUserId = extract(guid_regex, 1, tostring(split(UserId, "@")[0]))
| project
AnomalyTimeGenerated,
UserId,
AadUserId,
InstanceUrl,
Details,
CloudAppId
Declared entities
Related content
Links established from declared identifiers and solution manifests.
Source provenance
GitHubDisplayed values come from files in Azure/Azure-Sentinel. They describe the published template, not your workspace configuration.
- Commit
9800e51↗- Source identifier
0820da12-e895-417f-9175-7c256fcfb33e
GSTEP / CATALOG TRACKING
Added to catalog : 16 Sept 2026 · 05:49 UTC
Last change observed : 16 Sept 2026 · 05:49 UTC