Skip to main content

Defender for Identity on domain controllers

Microsoft documentedDefender for Identity · Source checked 2026-10-22 · Not yet verified in tenant · Sources: [1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24]

What it is​

Microsoft Defender for Identity (MDI) watches Active Directory for identity attacks. A sensor on each domain controller, AD FS, AD CS and Entra Connect server parses network traffic, Windows events and ETW locally, sends only what the detections need to the cloud service, and the cloud side does the analytics. Alerts, incidents, posture recommendations and response actions all land in the Defender portal next to MDE, MDO and MDA signal.

Detections map to the attack stages Learn lists: reconnaissance (user, group, IP and resource enumeration), compromised credentials (brute force, repeated failed auth, suspicious group membership changes), lateral movement against sensitive identities, and domain dominance (remote code execution on DCs, DCShadow, malicious replication, Golden Ticket). Non-human identities are in scope: service accounts, sync accounts, applications. Portal alerts are grouped by kill chain phase and come in two layouts, classic and Defender-format; the Detection source field tells you which engine fired.

MDI is not an AD audit log. Learn is explicit that it captures only what its detections and recommendations need. Full directory change auditing is Sentinel plus the Security event log.

This article sits in the servers section because the sensor is a server workload. The rest of the Defender for Servers story is in overview and onboarding. Hunting on the identity tables uses the same surface as EDR and hunting.

Licensing and prerequisites​

  • Licence: one of EMS E5/A5, Microsoft 365 E5/A5/G5, Microsoft 365 E5/A5/G5/F5 Security, Microsoft 365 F5 Security + Compliance, or standalone Defender for Identity. Both F5 options also need M365 F1/F3 or Office 365 F3 plus EMS E3. Defender for Servers plans do not include MDI.
  • Workspace creation needs an Entra tenant and Security Administrator, or Unified RBAC System settings (Read and manage) plus Security settings (All permissions).
  • Two sensor generations. v3.x is for Windows Server 2019 and later, built on the MDE Sense platform. v2.x is for 2016 and earlier (2012 R2 is out of support but still reports). Both can live in one workspace, never on one server.
  • v3.x: server onboarded to MDE (AV active or passive), or onboarded with the identity-only standalone package. Sensor 3.0.10 and later need the September 2026 CU (KB5122876 for 2019, KB5122882 for 2022, KB5122871 for 2025). No sizing tool. No DSA.
  • v2.x: 2 cores, 6 GB RAM, 6 GB disk minimum (10 GB recommended) on top of the DC's needs. .NET Framework 4.7 or later (installer adds it, may restart). Npcap OEM 1.0 ships in the package. Needs a Directory Service Account for full coverage. Run the sizing tool first.
  • Supported roles: DCs including RODCs, AD FS federation servers (not WAP), AD CS servers with the CA role (not offline CAs), Entra Connect active and staging servers. Desktop Experience and Server Core, not Nano.
  • Hyper-V: no Dynamic Memory. VMware: reserve all guest memory, disable Large Send Offload. Power plan High Performance. Clocks within 5 minutes.
  • Network, v2.x: TCP 443 to <workspace>sensorapi.atp.azure.com. Service tag AzureAdvancedThreatProtection. ExpressRoute BGP community 12076:5220. No SSL inspection; the sensor uses certificate-based mutual auth. Internal: DNS 53, TCP 135, UDP 137, TCP 3389 for name resolution, LDAP 389/636/3268/3269 cross-forest, TCP 444 sensor to updater.
  • Network, v3.x: the MDE connectivity URL set, streamlined or standard.
  • Readiness: Test-MdiReadiness.ps1 from the Microsoft-Defender-for-Identity GitHub repo, also under Identities > Tools (preview).

Decision rule: 2019 or later with the right CU gets v3.x, anything older gets v2.x. Keep v2.x on a DC only if you need VPN RADIUS integration or syslog notifications.

Learn's decision diagram: v3.x on Windows Server 2019 or later, v2.x on earlier versions. Source: Microsoft Learn, CC BY 4.0.
Learn's decision diagram: v3.x on Windows Server 2019 or later, v2.x on earlier versions. Source: Microsoft Learn, CC BY 4.0. · captured 2026-10-22

How it works​

Four parts: sensors, API connectors (Okta and other IAM sources), the cloud analytics service, and the Defender portal. Sensors capture and parse locally and upload only required signals. The cloud correlates with endpoint, email, SaaS and cloud app signal and emits alerts and incidents. Response actions go back down through the same sensor.

What the sensor reads depends on the role:

Sensor typeSignalEvents Learn requires
Domain controllerNetwork traffic, Security log, ETW, LDAP queries to AD4662, 4726, 4728-4733, 4741, 4743, 4753, 4756-4758, 4763, 4776, 5136, 7045, 8004
AD FSAD FS audit log, logon events1202, 1203, 4624, 4625
AD CSCA audit events4870, 4882, 4885, 4887, 4888, 4890, 4896
Entra ConnectLogon events, ADSync service config4624

The v2.x sensor runs as LocalService and impersonates the Directory Service Account for LDAP reads, SAM-R calls for local admin group membership, the Deleted Objects container, and domain and trust mapping at start and every 10 minutes. The v3.x sensor runs as LocalSystem for reads and remediation. That difference drives most migration work: once any sensor is v3.x, the action account setting must be "Automatically use the sensor's local system account" for all sensors.

v2.x updates come from the MDI cloud: the updater pulls a signed cab, extracts to a new versioned folder, repoints and restarts the service, one sensor at a time, with an optional 72 hour delayed ring. v3.x updates ride Windows Update as an MDE component.

Remediation: the portal checks Unified RBAC (Response manage), then hands the AD action to a DC sensor, which runs it under LocalSystem by default. Sensors on AD FS, AD CS and Entra Connect never execute actions. Entra actions go through the Microsoft-managed app 60ca1954-583c-4d1f-86de-39d835f3e452. Attack disruption uses the same path.

Posture: MDI feeds Secure Score recommendations in the Defender portal, filtered by product Defender for Identity.

Entity tags feed detections. Members of the built-in privileged groups (Domain Admins, Enterprise Admins, Schema Admins, Account Operators, Backup Operators and the rest) are Sensitive automatically, as are CA, DHCP, DNS and Exchange servers and accounts with Replicating Directory Changes. Honeytoken tags turn dormant accounts into tripwires.

Configure​

All MDI settings live at Defender portal > System > Settings > Identities (security.microsoft.com/securitysettings/identities).

  1. On-premises > Sensor management. MDE-onboarded servers appear with a status: Onboarded, Activate sensor, Manually onboard, or Upgrade to the latest Windows Update. For a 2019+ DC, select it and choose Activate. Or turn on Automatic sensor v3.x activation under General > Advanced features.
Success banner after manual v3.x activation, with the link back to Sensor management. Source: Microsoft Learn, CC BY 4.0.
Success banner after manual v3.x activation, with the link back to Sensor management. Source: Microsoft Learn, CC BY 4.0. · captured 2026-10-22
  1. For a server not onboarded to MDE, or for v2.x, select Download onboarding package. Expand Windows Server 2019 or later (package name, Generate package) for the v3.x standalone package, or Windows Server 2016 or earlier for the v2.x ZIP. Copy the access key. It is a one-time registration secret.
Download onboarding package pane with the two OS branches. Source: Microsoft Learn, CC BY 4.0.
Download onboarding package pane with the two OS branches. Source: Microsoft Learn, CC BY 4.0. · captured 2026-10-22
  1. v2.x install: extract the ZIP (running from inside the archive fails), run Azure ATP sensor setup.exe as admin, keep the default path under %programfiles%\Azure Advanced Threat Protection sensor, paste the key, Install. The wizard picks the sensor type from the server role and warns on low hardware without blocking.
Configure the sensor page: installation path and access key. Source: Microsoft Learn, CC BY 4.0.
Configure the sensor page: installation path and access key. Source: Microsoft Learn, CC BY 4.0. · captured 2026-10-22
  1. Directory service accounts (v2.x only). Settings > Identities > Directory service accounts > Add credentials. For a gMSA tick Group managed service account, name with the trailing $ (for example mdiSvc01$), domain as full FQDN of the domain holding the account. No password. Up to 30 entries by default; one per forest in untrusted multi-forest setups.
Directory service accounts page in the Defender portal. Source: Microsoft Learn, CC BY 4.0.
Directory service accounts page in the Defender portal. Source: Microsoft Learn, CC BY 4.0. · captured 2026-10-22
Add credentials pane with the gMSA option. Source: Microsoft Learn, CC BY 4.0.
Add credentials pane with the gMSA option. Source: Microsoft Learn, CC BY 4.0. · captured 2026-10-22
  1. Manage action accounts. Settings > Identities > Microsoft Defender for Identity > Manage action accounts. Leave Automatically use the sensor's local system account selected. Only add a gMSA action account if you have a reason to scope write rights yourself, and never if any sensor is v3.x.

  2. Windows auditing. For v3.x turn on Automatic Windows auditing configuration under Advanced features; the sensor applies advanced audit policy, NTLM auditing, domain object, Configuration container and ADFS container SACLs, and the AD CS audit filter value to local policy every 24 hours. For v2.x use GPO or the PowerShell module (next tab). AD FS Management event auditing and verbose level stay manual in both modes.

NTLM auditing setting in Default Domain Controllers Policy, needed for event 8004. Source: Microsoft Learn, CC BY 4.0.
NTLM auditing setting in Default Domain Controllers Policy, needed for event 8004. Source: Microsoft Learn, CC BY 4.0. · captured 2026-10-22
  1. Entity tags: Settings > Identities > Sensitive, Honeytoken, Exchange server tabs. Tag users, devices or groups. Set at least one honeytoken account; it doubles as your detection test.

  2. Exclusions: Settings > Identities > Excluded entities. Exclusions by detection rule, or Global excluded entities (IPs, subnets, devices, domains). Learn now steers you to alert tuning rules instead.

  3. v2.x only: Sensor management > select sensor > Enable delayed update puts it in the 72 hour ring.

Verify​

  • Sensor management: server listed, Service status running, Sensor status Up to date, Health status healthy. First v3.x activation in a tenant can take up to an hour to show Running; later ones about five minutes. No restart.
  • Settings > Identities > Deployment > Health issues. Global tab for domain-wide problems, Sensor tab per server. Audit checks run once a day, so a GPO fix can take up to 24 hours to close its alert.
Health issues page with the Global and Sensor tabs. Source: Microsoft Learn, CC BY 4.0.
Health issues page with the Global and Sensor tabs. Source: Microsoft Learn, CC BY 4.0. · captured 2026-10-22
  • On a v2.x host: auditpol.exe /get /category:* after gpupdate, then confirm 4776, 4662, 5136 and 8004 are landing in the Security log. Services are AATPSensor and AATPSensorUpdater.
  • Identities > Dashboard populates. Assets > Devices > the DC shows MDI events on the timeline. A user page has Overview, Observed in organization and Timeline. If a group timeline is empty, change a membership in AD to generate an event.
  • Advanced Hunting:
IdentityDirectoryEvents
| where TargetDeviceName contains "DC_FQDN"
| summarize count() by ActionType
| order by count_ desc
IdentityQueryEvents
| where DeviceName contains "DC_FQDN"
| take 20
  • Detection test, Learn's version: tag a dormant test account as Honeytoken, sign in with it against the activated DC, and wait for the honeytoken alert. Also create a suspicious service on the DC and run a remote command on it from a workstation as admin. Learn does not name the exact alert titles on that page.
  • Posture test: set ms-DS-MachineAccountQuota to 10, confirm Resolve unsecure domain configurations appears in Secure Score filtered to Defender for Identity, set it back to 0.
  • Remediation test: on a test user's page run Disable from the Actions menu, check AD, then Enable. Track in Action center.

Troubleshoot​

SymptomLikely causeFix
Health: Sensor service failed to start (30+ minutes)Bad config pull, cert chain, or v2.x start-up LDAP auth failureRead sensor logs under the install folder. Check Test-MDISensorApiConnection. Confirm DSA can bind over LDAP.
Health: Sensor stopped communicatingFirewall or proxy blocking *sensorapi.atp.azure.com (v2.x) or MDE URLs (v3.x), or SSL inspectionOpen the URLs, remove the sensor host from inspection. Browser test to /tri/sensor/api/ping returns the sensor version on success.
Health: Directory services user credentials are incorrectWrong DSA name or domain, gMSA host not in the retrieval group, Log on as a service denied to the gMSA, or a stale DSA left behind after v3.x migrationCheck name ends with $ and domain is the account's own FQDN. Add host to the gMSA group and klist purge -li 0x3e7. Add gMSA plus NT Service\All Services to Log on as a service. After full v3.x migration, delete the DSA entry. gMSA rotation can cause a brief alert that closes on its own.
Health: packet capturing component (WinPcap, Npcap too old, Npcap not configured)WinPcap still installed, or a third-party Npcap below 1.0 or with wrong optionsFollow aka.ms/mdi/npcap. Package since 2.184 bundles Npcap OEM 1.0 but only installs it when no Npcap exists.
Health: NTLM Auditing is not enabled, Advanced Auditing not enabled, Object Auditing not enabledGPO not applied, or a local setting overridden by GPO, or the v3.x known issue with manual auditingNew-MDIConfigurationReport to see gaps, Set-MDIConfiguration -Mode Domain -Configuration All. On v3.x turn on Automatic Windows auditing configuration; detections work either way.
Health: Sensor v3.x RPC Audit MisconfiguredSensor older than 3.0.8 without the RPC audit tag, or CU missingInstall the September 2026 CU for 3.0.10+. From 3.0.8 RPC auditing is automatic on DCs.
Health: Sensor reached a memory resource limit, Some Windows or ETW events not analyzedUnder-sized v2.x hostSizing table in capacity planning. Add RAM and cores or add DCs to the site. Sensor reserves at least 15 percent of DC CPU and RAM and will restart itself.
Health: Power mode isn't configured for optimal processor performanceBalanced power planHigh Performance, or min and max processor state 100.
Health: Sensor outdated (v3)Server missing the Windows CU the sensor needsInstall latest CU, confirm Version column.
Health: Sensor outdated (v2)Auto-update failingFix updater connectivity on TCP 444 and internet, or reinstall from the latest package.
Health: Sensor failed to retrieve Microsoft Entra Connect service configurationADSync service stopped or DSA lacks database rightsStart ADSync, grant the sensor DB permissions per the Entra Connect SQL guidance.
Silent install fails from PowerShellMissing .\ prefixUse .\"Azure ATP sensor Setup.exe".
Install fails from ZIPRunning inside the archiveExtract first.
Sensor on 2019 stops itselfKB4487044 missing, ntdsai.dll older than 10.0.17763.316 (v2.x)Patch the DC.
Proxy change via PowerShell has no effectProxy was set with WinINet or registry originallyChange it with the same legacy method, or Clear-MDISensorProxyConfiguration and set again.
Proxy auth error shows as connection errorTrusted root certificates missing on the hostInstall the required root CAs.
Remediation action pending foreverNo DC sensor in that domain, or Response (manage) permission missingActions run only on DC sensors. Check Unified RBAC role.

Gotchas and limits​

  • Entra Connect as sensor host: sensors go on active and staging servers, and the sensor needs database rights to read the ADSync config. A v2.x sensor on a non-DC Entra Connect server requires a DSA. If the box is also a DC, the sensor type is Domain controller and covers both.
  • AD FS and AD CS need extra auditing beyond the DC set. AD FS: Audit Application Generated, success and failure audits in Federation Service properties, verbose audit level, SACL on the ADFS container. AD CS: Audit Certification Services plus a CA audit filter. Automatic auditing only edits an existing CA filter, and the change waits for a certsvc restart. Auditing CA start and stop on a large CA database slows restarts.
  • Mixed estates: v2.x and v3.x coexist in a workspace, not on a server. Any v3.x sensor forces the LocalSystem action account for all, and a leftover DSA is validated on every sensor until deleted. v3.x on AD FS, AD CS and Entra Connect is preview with no in-place migration yet, and v3.x on non-DC roles alone still needs one v3.x DC sensor.
  • Busy DCs: v2.x needs TriSizingTool.exe (aka.ms/mdi/sizingtool) run for 24 hours before install. The table runs from 0.25 cores and 2.5 GB under 1k packets per second to 7.5 cores and 13.5 GB at 100k, physical cores only. v3.x self-limits at 30 percent CPU and 1.5 GB and throttles at the cap.
  • Action account: LocalSystem on the DC is the recommended default and what attack disruption uses. A custom gMSA needs Reset password, read and write pwdLastSet, read and write userAccountControl on descendant User objects, and must not be reused on non-DC servers or doubled as the DSA. v3.x ignores it.
  • Auto-updates: v2.x pulls from the cloud and restarts its own services, one sensor at a time, with a 72 hour delayed ring as the only control. v3.x rides Windows Update with MDE, so DC patch cadence is now sensor cadence and a missing CU shows as Sensor outdated (v3).
  • v3.x drops VPN RADIUS integration and syslog notifications and has ExpressRoute limitations. Stay on v2.x for that DC if you need them.
  • Classic exclusions stop applying when a detection moves to the XDR engine. Rebuild them as alert tuning rules first.
  • Tag before go-live. An untagged service account in a custom admin group is invisible to the sensitive-group alerts.
  • Access keys: v2.x regeneration is harmless to existing sensors. v3.x standalone package regeneration breaks installs still using the old key.
  • Add/Remove Programs shows the v2.x install-time version forever. Read the real version in the portal.

Further reading​

My notes​

TODO: Sohail's notes after verification.

Changelog​

DateChangeSource
2026-10-22Drafted from Learn, with Learn images and diagrams[1]