← Back to SOC feed Coverage →

MultipleLdaps

kql MEDIUM Azure-Sentinel
IdentityQueryEvents
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-09T11:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may use multiple LDAP queries to enumerate Active Directory users or groups in a short time window, indicating potential reconnaissance or credential stuffing attempts. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate early-stage reconnaissance efforts that could lead to credential compromise or lateral movement.

KQL Query

let Thershold = 10;
let BinTime = 1m;
IdentityQueryEvents
| where ActionType == "LDAP query"
| parse Query with * "Search Scope: " SearchScope ", Base Object:" BaseObject ", Search Filter: " SearchFilter
| summarize NumberOfLdapQueries = count(), NumberOfDistinctLdapQueries = dcount(SearchFilter) by DeviceName, bin(Timestamp, BinTime)
| where NumberOfDistinctLdapQueries > Thershold 

Analytic Rule Definition

id: 13476066-24d0-4b19-8fd5-28fe42ab35f6
name: MultipleLdaps
description: |
  Detect multiple Active Directory LDAP queries made in bin time
  Replace 10 on line 1 with your desired thershold
  Replace 1m on line 2 with your desired bin time
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - IdentityQueryEvents
query: |
  let Thershold = 10;
  let BinTime = 1m;
  IdentityQueryEvents
  | where ActionType == "LDAP query"
  | parse Query with * "Search Scope: " SearchScope ", Base Object:" BaseObject ", Search Filter: " SearchFilter
  | summarize NumberOfLdapQueries = count(), NumberOfDistinctLdapQueries = dcount(SearchFilter) by DeviceName, bin(Timestamp, BinTime)
  | where NumberOfDistinctLdapQueries > Thershold 

Required Data Sources

Sentinel TableNotes
IdentityQueryEventsEnsure this data connector is enabled

References

False Positive Guidance

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