Query Details
//Modifications to this registry key could move a device into a different MDE Device Group DeviceRegistryEvents | where TimeGenerated > ago(90d) | where RegistryKey == "HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows Advanced Threat Protection\\DeviceTagging" | where RegistryValueName == "Group" | where InitiatingProcessAccountDomain <> "nt authority" and InitiatingProcessAccountName <> "system"
This query is designed to identify changes made to a specific registry key on devices within the last 90 days. The registry key in question is related to Microsoft Defender for Endpoint (MDE) and is used for device tagging, which can affect the device's group assignment within MDE.
Here's a breakdown of what the query does:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Advanced Threat Protection\DeviceTagging.In simple terms, the query is searching for user-initiated changes to a specific registry setting that could alter which group a device belongs to in Microsoft Defender for Endpoint, excluding changes made by system processes.

Jay Kerai
Released: July 3, 2025
Tables
Keywords
Operators