Skip to content

Microsoft Defender XDR

The Microsoft Defender XDR data source (microsoft_defender_xdr) pulls the alerts and incidents of Microsoft Defender XDR through the Microsoft Graph security API (/security/alerts_v2 and /security/incidents): Defender for Endpoint, Office 365, Identity and Cloud Apps, Entra ID Protection, Purview DLP and the other products that report to the Defender portal. Alerts carry their evidence (devices, users, addresses, files), MITRE ATT&CK techniques and the Defender portal link.

It reuses the app registration of your Microsoft 365 provider (the one DRACO scans with and the Microsoft 365 audit source uses): no new secret.

This page covers the Defender parts of a Microsoft 365 connection.

Logs

Client setup (Entra ID administrator)

  1. In the Entra admin center open App registrations > the app of the Microsoft 365 provider.
  2. API permissions > Add a permission > Microsoft Graph > Application permissions: add SecurityAlert.Read.All and SecurityIncident.Read.All.
  3. Click Grant admin consent for (Global Administrator or Privileged Role Administrator).
  4. Wait a few minutes for the consent to apply.

The source reads only; no write permission is needed.

Add the source in DRACO

  1. Open the Microsoft 365 tenant's connector, click Add a part and tick Logs under Collectors (or tick it right after Launch Scan when you add the tenant); choose the Microsoft Defender XDR log type and the Microsoft cloud (commercial or GCC; GCC High and DoD tenants are not supported).
  2. Keep Also collect incidents on (needs SecurityIncident.Read.All).
  3. Test reads a sample; a missing permission is named in the error, and the source is created only after a passing test.

What DRACO collects

Event Columns
Alert (action alert.<status>) class Detection Finding, severity, host the first device of the evidence, actor_user the user principal of the evidence, src_ip the device's address, url the alert in the Defender portal (alertWebUrl), cloud_account the tenant id
Incident (action incident.<status>) severity, url the incident (incidentWebUrl), message its name

Each version of an alert (lastUpdateDateTime) is one event; xdr holds kind, vendor_id, status, severity, host, user, ip, tactics (from the alert category), techniques and console_url.

Latency and cost

  • Polls every 5 minutes with a 15-minute overlap; Graph @odata.nextLink paging (500 alerts, 50 incidents per page), up to 2,000 per stream and run; a cut run resumes from the stored next link.
  • Graph throttling (429) is retried with Retry-After. No Microsoft cost beyond your Defender licenses.

Built-in rules (draco-edr-network)

Rule When
Microsoft Defender XDR: high severity alert (recommended) a new or in-progress high alert
Microsoft Defender XDR: medium severity alert the same for medium alerts (off by default)
Microsoft Defender XDR: endpoint threat active, not remediated (recommended) a medium or higher Defender for Endpoint alert for an active threat or a failed remediation
Microsoft Defender XDR: tampering with Defender or other defenses (recommended) an alert of any severity about turning off Defender, sensor tampering or Disable or Modify Tools
Microsoft Defender for Identity: attack on the domain (recommended) a medium or higher Defender for Identity alert for DCSync, Golden Ticket, pass-the-hash or -ticket, Kerberoasting, honeytokens, brute force or password spray
Microsoft Defender for Office 365: user clicked a malicious link (recommended) a Safe Links alert for a malicious URL click
Microsoft Defender XDR: ransomware activity (recommended) an alert of any severity for ransomware, file encryption or recovery inhibition
Microsoft Defender XDR: alert on a privileged account a medium or higher alert whose user name looks privileged; off by default: account naming differs, duplicate it as a custom rule with your naming convention
Microsoft Defender XDR: several alerts on one device within an hour (recommended) three or more different alerts on one device
Microsoft Defender XDR: one account in alerts on several devices medium or higher alerts for one account on three or more devices within two hours (off by default)

One DRACO alert per Defender alert for seven days (grouped by the portal link). The correlation rules (several alerts on one device, one account on several devices) count distinct Defender alerts and raise their own DRACO alerts.

With the Microsoft Defender XDR incident connector too. One Defender alert gives one DRACO incident. While an incident connector of Microsoft Defender XDR is active, the rule's alert is kept but joins the connector's incident for the same Defender alert instead of opening a second incident; if the rule fires before the connector's next sync, the alert waits in Alerts and joins the incident when it is imported. The alert joins the Defender incident that contains it.

Hunts, dashboard and Sigma

  • Threat hunting > Library: Defender: attacks on Active Directory, phishing that reached a device, tampering and threats left active and alert mix by product and category.
  • Dashboards > Add prebuilt > Microsoft Defender XDR: alerts by severity over time and by category, top devices and users, device protection (tampering and active threats) and the latest high alerts.
  • Sigma import: rules with logsource: {product: microsoft365defender} read this source; Advanced hunting names (DeviceName, AccountUpn, Title, ServiceSource, Category...) map to the Graph alert, whose values are the Graph API's (microsoftDefenderForEndpoint).

Incidents

Imports Defender XDR incidents as DRACO incidents and keeps their status and classification in sync; how sync works for every vendor is in Incident connectors.

  1. In the Microsoft Entra admin center create an app registration (DRACO incidents, single tenant), or reuse the one of your Microsoft 365 provider.
  2. API permissions > Microsoft Graph > Application permissions: SecurityIncident.Read.All; two-way: SecurityIncident.ReadWrite.All instead. Grant admin consent.
  3. Create a client secret. In DRACO pick the Microsoft 365 provider, or an OAuth client credential with the client id and secret plus the Directory (tenant) ID.

Response

With the Response part of the Microsoft 365 connection, DRACO can isolate a Defender for Endpoint device (full or selective), release it, and add or remove an indicator (response actions). They sign in with the connector's write access: a separate app registration, so the read app of logs and incidents keeps read permissions only.

  1. In Entra ID > App registrations register an app (for example DRACO response) and add a client secret or certificate.
  2. Isolate and Release device: API permissions > Add a permission > APIs my organization uses > WindowsDefenderATP > Application permissions: Machine.Isolate and Machine.Read.All (Isolate machine API).
  3. Add and Remove indicator: Ti.ReadWrite.All on the same API (Submit or update indicator API).
  4. Click Grant admin consent for the tenant.
  5. Create an OAuth client (or Certificate) credential of the app in DRACO and pick it as the connector's write access.
  6. Test: reads the application permissions in the app's token, without calling Defender, and names the missing one.

Selective isolation needs Windows 10 version 1709 or later; full isolation works on Windows 10 version 1703 or later, Windows 11 and Linux. An indicator is a public IP address (no ranges), a URL, a domain or a SHA-1, SHA-256 or MD5 hash, with the action audit, warn, block or block and remediate (files), a severity, device groups (empty: every device) and an expiry in days (0: never). A device is a Defender machine id or the device name.

If you turn on several parts

When you connect Microsoft 365 once and tick several parts, the wizard shows one guide for all of them: what to check first, the access to create once, one list of permissions that names the part each one is for, the extra steps of each part, and one test that checks every part on its own. Turning a part on later shows only what it adds.

Posture, the audit log, Defender XDR alerts and incidents all use the app registration of the Microsoft 365 provider: register it and create its secret or certificate once, then add the application permissions of each part and grant admin consent. Response actions (disable user, revoke sessions, isolate a device, indicators) need write permissions: give them to a separate app registration used as the write access.

Troubleshooting

Last error Fix
... SecurityAlert.Read.All with admin consent Add the application permission and grant admin consent.
... SecurityIncident.Read.All Same for incidents, or turn off Also collect incidents.
Cannot sign in to Microsoft Entra ID (AADSTS...) Fix the provider's credentials on the connector page.
The app registration lacks Machine.Isolate Add the WindowsDefenderATP application permission to the response app and grant admin consent.
Defender indicators take public IP addresses only Defender does not take private addresses or CIDR ranges as indicators.

Not covered yet

  • Advanced hunting tables (raw Defender for Endpoint telemetry).
  • Updating incidents from DRACO is done by an incident connector with two-way sync (SecurityIncident.ReadWrite.All). Updating single alerts (SecurityAlert.ReadWrite.All) is not covered.