← Back to SOC feed Coverage →

localAdminAccountLogon

kql MEDIUM Azure-Sentinel
DeviceLogonEvents
huntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-23T23:00:00Z · Confidence: medium

Hunt Hypothesis

A malicious insider may have added a local admin account to gain elevated privileges and access sensitive systems. SOC teams should proactively hunt for this behavior to identify potential insider threats and unauthorized access in their Azure Sentinel environment.

KQL Query

DeviceLogonEvents
| where IsLocalAdmin == 1
 and AccountDomain == DeviceName

Analytic Rule Definition

id: 2211b57b-7d13-435d-89a9-40f333249605
name: localAdminAccountLogon
description: |
  This query looks for local admin account used to logon into the computer.
  This can help to detect malicious insiders that were able to add a local account to the local admin group offline.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceLogonEvents
query: |
  DeviceLogonEvents
  | where IsLocalAdmin == 1
   and AccountDomain == DeviceName

Required Data Sources

Sentinel TableNotes
DeviceLogonEventsEnsure this data connector is enabled

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Persistence/localAdminAccountLogon.yaml