Query Details
// X-3 - Insider Risk behavior ⨯ Purview confidential label movement (±1h)
// Run in: security.microsoft.com -> Hunting -> Advanced hunting (UNIFIED PORTAL)
let irBehaviors =
DataSecurityBehaviors
| where Timestamp > ago(7d)
| where IsAnomalous == 1
| project IrTime=Timestamp, AccountUpn, ActionType, Categories, ActivityCount;
let confMoves =
MicrosoftPurviewInformationProtection
| where TimeGenerated > ago(7d)
| where LabelName has_any ("Confidential","Highly Confidential","Restricted")
| project MoveTime=TimeGenerated, AccountUpn=UserId, ItemName, ObjectId, Operation, LabelName, Receivers;
irBehaviors
| join kind=inner confMoves on AccountUpn
| where MoveTime between (IrTime - 1h .. IrTime + 1h)
| project IrTime, MoveTime, AccountUpn, ActionType, Categories, Operation, LabelName, ItemName, Receivers
| order by IrTime descThis query is designed to identify potential insider risk behaviors related to the movement of files labeled as confidential within the last seven days. Here's a simplified breakdown of what the query does:
Identify Anomalous Behaviors:
DataSecurityBehaviors table to find any anomalous activities (marked by IsAnomalous == 1) that occurred in the past seven days.Track Confidential Label Movements:
MicrosoftPurviewInformationProtection table for any movements of items labeled as "Confidential," "Highly Confidential," or "Restricted" within the same seven-day period.Correlate Behaviors and Movements:
AccountUpn).Output and Order Results:
In summary, this query helps security analysts detect and investigate potential insider threats by correlating suspicious user behaviors with the movement of sensitive information.

David Alonso
Released: May 25, 2026
Tables
Keywords
Operators