Microsoft Defender for Endpoint (MDE) is one of the most widely deployed endpoint detection and response platforms in enterprise environments. It provides security teams with extensive visibility into process execution, network connections, file activity, script execution, and other endpoint behaviors. Once installed, the Defender sensor automatically collects a predefined set of telemetry.

However, there is an important distinction between the events that occur on an endpoint and the events that ultimately become available to security analysts in Microsoft Defender XDR.

Not every event generated on an endpoint is necessarily forwarded to the cloud, and not every endpoint activity is represented as an individual event in Advanced Hunting.

This distinction matters significantly for threat hunting, detection engineering, digital forensics, and incident response.

Historically, Microsoft Defender for Endpoint has relied on internal telemetry processing, aggregation, and event-volume controls to balance endpoint performance, network bandwidth, cloud storage, and security visibility. These mechanisms are necessary to operate the platform at scale, but they can also create telemetry blind spots.

Microsoft introduced a feature called Custom Data Collection Rules, which enables the collection of additional events targeting specific activities, processes, files, and network behaviors. With this feature, it is possible to collect additional events that target specific activities, processes, files, and network behaviors.

Understanding the problem: EDR telemetry is not a complete event log

A common assumption about endpoint detection and response platforms is that every monitored activity results in a corresponding event in the security portal. For example, an analyst might assume that if a process establishes 100 network connections, the DeviceNetworkEvents table will contain 100 corresponding records. In practice, the relationship between endpoint activity and cloud telemetry is more complicated.

One of the most important components in this architecture is local telemetry processing. This is provided locally on the endpoint by the Defender EDR components.

Sending every event generated by every endpoint directly to the cloud would introduce substantial operational overhead, particularly in environments containing thousands or hundreds of thousands of devices.

An EDR platform therefore needs mechanisms to decide which events are forwarded, how frequently they are reported, and whether similar observations can be combined. From a detection engineering perspective, the following question is important:

What happens when the activity we need to investigate is precisely the activity being aggregated or suppressed?

Event deduplication and aggregation

Research published by Olaf Hartong and FalconForce examined the internal telemetry collection behavior of Microsoft Defender for Endpoint.

Their research identified configurations in which certain event types were subject to local aggregation and distinct-event limits.

The following research is a must-read to get more background information on event deduplication and aggregation: Microsoft Defender for Endpoint Internals 0x06 – Custom Collection

Introducing Custom Data Collection Rules

Custom Data Collection Rules allow security teams to configure additional endpoint telemetry collection based on explicitly defined conditions.

Instead of depending entirely on default telemetry processing, organizations can create targeted rules to collect particular categories of events and forward the resulting data into Microsoft Sentinel.

The good news is, it will not require AMA or other data collection agents. It is natively part of the Defender sensor without deploying additional complexity.

How does the custom collection model work?

Custom collection does not replace the default Defender for Endpoint configuration. Both collection paths operate alongside one another. This allows security teams to retain standard Defender telemetry while collecting additional events for specific investigative or monitoring requirements, helping address gaps in default telemetry visibility.

Supported event categories

The capability supports five custom event tables. The custom data is stored in the custom collection table with the name convention DeviceCustomXXX. The custom tables follow the same schema as their corresponding standard Defender for Endpoint event tables.

Standard tableCustom collection table
DeviceProcessEventsDeviceCustomProcessEvents
DeviceNetworkEventsDeviceCustomNetworkEvents
DeviceFileEventsDeviceCustomFileEvents
DeviceImageLoadEventsDeviceCustomImageLoadEvents
DeviceScriptEventsDeviceCustomScriptEvents

Each category serves a different investigative purpose.

Process events are useful for monitoring process creation, suspicious command-line arguments, unexpected execution paths, and parent-child process relationships.

Network events support investigations involving outbound connections, unusual destinations, lateral movement, and potentially repetitive command-and-control activity.

File events help analysts examine sensitive file operations, suspicious file creation, and activity in locations associated with persistence or malware staging.

Image-load events can provide visibility into modules and libraries loaded by processes, which is valuable when investigating DLL-based execution techniques or suspicious module loading.

Script events support investigations involving script-related execution behavior, although the available event coverage must not be confused with complete AMSI or script-content visibility.

Information

In particular, custom script collection should not be assumed to expose every AMSI event or the full contents of every executed script.

Custom Data Collection Rules are not:

  • A replacement for Microsoft Defender Antivirus or EDR protection.
  • A guarantee that every operating system event will be captured.
  • An unrestricted replacement for Windows Event Forwarding or Sysmon.
  • A method of bypassing all endpoint telemetry limitations.
  • A substitute for properly engineered detections and incident response procedures.

The feature provides additional, configurable telemetry collection within Microsoft’s supported event categories. It remains subject to endpoint compatibility, collection rules, deployment behavior, and per-rule event limits.

Prerequisites

Before configuring custom event collection in Defender, a couple of requirements need to be in place for the feature to work. The following prerequisites are needed:

LicenseMicrosoft Defender for Endpoint Plan 2
Microsoft Sentinel workspaceConnected Microsoft Sentinel workspace (required for custom data storage and querying); currently limited to one Sentinel workspace per tenant for custom data collection
Dynamic tagsConfigured in Asset Rule Management and run at least once; manual (static) tags aren’t supported
Supported operating systems• Windows 10 and 11 (minimum client version 10.8805; Windows 10 requires ESU enrollment)
• Windows Server 2019 and later
Cost considerationsCustom data collection is included with Defender for Endpoint Plan 2; data ingestion into Microsoft Sentinel incurs charges based on your Sentinel billing

More information and limits: Create and manage custom data collection rules in Microsoft Defender for Endpoint

Why Microsoft Sentinel is required

One of the most common questions is why Microsoft Sentinel is required. The additional data is associated with the Sentinel-connected experience and its underlying data ingestion and storage model. The custom connected data is not stored directly in the Defender XDR dataset. All the ingested data and events are billed via the Sentinel billing mechanism.

The collected data is not stored in the MDE tables, which are included with the license at a fixed fee, but is instead sent directly to Sentinel tables. This means additional ingestion costs on top of the Defender license. It is important to account for these costs to avoid unexpectedly high ingestion bills.

Configure Custom Data Collection Rules

Via the Defender portal, you can create custom collection rules. Under Settings > Endpoints > Custom Collection. Here, you’ll find an overview of all your implemented custom collection rules, and the option to create new rules via the wizard.

Before we start creating new rules, we need to onboard the Microsoft Sentinel workspace on the right side. You need to select the workspace at this stage, even if you already have a connected Microsoft Sentinel workspace with Microsoft Defender.

Select the correct workspace;

Tagging

Before creating the collection rule, identify a small number of test endpoints. The only way of testing across a small set of endpoints is via the dynamic tag set via asset rule management.

Microsoft recommends beginning with approximately five to ten devices and monitoring the resulting data for 24–48 hours before expanding the scope. Configure the tag through Asset Rule Management; it is not supported to use native or API set tags. The only way to use tagging is via Asset Rule Management. So it is advisable to create a good naming structure based on the tags. For example CustomDataCollection-Pilot-Workstations (TAG: CDC-PILOT-Workstations)

Verify that the expected endpoints have received the tag before creating any rule, since the tag is needed to scope the rule. Collection rules can target either devices with a supported dynamic tag or all eligible devices. Manually assigned tags are not supported for scoping custom collection rules.

Process and rule

Enter a descriptive rule name and an explanation of its purpose. The exact actions and condition operators available depend on the selected event category. Via the rule created, the logic can be designed. The available options depend on the supported table. As an example, the DeviceProcessEvents allows us to pick only the action ProcessCreated.

For example, to collect PowerShell data based on powershell.exe/ pwsh.exe:

Information

This is just an example, and it can increase the load of data. Why include both filenames? Windows PowerShell typically uses, while PowerShell 7 and later use pwsh.exe. Including both ensures that the rule targets both PowerShell versions.

ActionType = ProcessCreated

AND

FileName IN (
    "powershell.exe",
    "pwsh.exe"
)

A good tip is to use the TelemetryCollectionManager by FalconForce: GitHub – FalconForceTeam/TelemetryCollectionManager: Manage and maintain Defender XDR custom collection configuration · GitHub

Currently, there’s no API. The tool created by FalconForce is a good resource to deploy it more simply without clicking around in the Defender portal.

When creating a new rule, it can take up to 1 hour before the deployment is completed.

Templates and options

Via the overall view, you have the option to create custom data collection rules for process/ network events/ file/ image load or script. File data collection has already pre-created templates:

Templates are pre-filled with rule conditions:

Validate data

To check if a rule is collecting data from a specific device, use the following KQL query to search all custom event tables in Advanced Hunting. The following query can be used to check if custom data is sent to the workspace. Use the device ID to validate that the data is sent from the specific device:

KQL
search in (DeviceCustomFileEvents, DeviceCustomScriptEvents, DeviceCustomNetworkEvents, DeviceCustomProcessEvents, DeviceCustomImageLoadEvents) "your_device_id"
| where DeviceId == "your_device_id"
| summarize EventCount = count() by RuleName, RuleLastModificationTime, $table
| order by RuleLastModificationTime desc

Data

Data is available in Advanced Hunting and follow the original schema of the themes. The data can be used for custom detections and additional hunting.

Example use case: Monitoring sensitive file locations

File activity is another area where custom data collection can be valuable. For example, a server hosting a sensitive application configuration directory.

Security teams may want enhanced visibility into file creation, modification, or deletion events within that location.

Potential scenarios include:

  • Unauthorized changes to application configuration.
  • Suspicious creation of executable files.
  • Malware staging in sensitive directories.
  • Unexpected modifications to application components.
  • Investigation of persistence mechanisms.

For example, an organization might define a collection rule targeting file activity under C:\ProgramData\Contoso\SensitiveApp\

The exact filter syntax and supported actions must be configured using the rule wizard. Once collected, the events can be analyzed via KQL and the DeviceCustomFileEvents table.

Event threshold

Microsoft documents the following collection limits:

  • Each rule can collect up to 75,000 events per device within a rolling 24-hour window.
  • Once the threshold is reached, additional event collection for that rule is paused until capacity becomes available within the rolling window.
  • Custom collection rules operate alongside the default Microsoft Defender for Endpoint telemetry collection.
  • The 75,000-event threshold applies per rule, per device.

These limits are important when designing custom collection rules. For example, a broadly configured rule collecting thousands of events per hour could reach the collection threshold before the end of the 24-hour window, potentially creating additional visibility gaps.

KQL
union
    DeviceCustomProcessEvents,
    DeviceCustomNetworkEvents,
    DeviceCustomFileEvents,
    DeviceCustomImageLoadEvents,
    DeviceCustomScriptEvents
| where Timestamp > ago(24h)
| summarize
    EventCount = count(),
    FirstEvent = min(Timestamp),
    LastEvent = max(Timestamp)
    by DeviceId, DeviceName, RuleName
| extend LimitUtilization =
    round(100.0 * EventCount / 75000, 2)
| order by EventCount desc

To monitor event volume and identify rules approaching the documented threshold, the following KQL query can be used to summarize collected events per device and rule over the last 24 hours.

Information

This query provides an indication of event volume relative to the documented limit. It does not directly expose the sensor’s internal collection counters. Differences in event ingestion, processing delays, and the rolling collection window can affect the results.

Conclusion

Custom Data Collection Rules address an important challenge in endpoint security: the gap between what happens on an endpoint and what is available for analysis in the security platform. Default EDR telemetry is designed to balance security value, scalability, and performance.

That balance is necessary, but it means that analysts cannot assume every operating system activity is represented by a corresponding Advanced Hunting event. Custom collection gives organizations a way to obtain additional telemetry for specific security scenarios, without the complexity of creating additional agents.

It is important to mention that collection limits still apply, and the supported event categories are defined by Microsoft.

Sources and further reading

Must-reads as well as related to this topic;

  1. Microsoft Learn: Custom Data Collection in Microsoft Defender for Endpoint – Official feature overview and supported event categories.
  2. Microsoft Learn: Create and Manage Custom Data Collection Rules – Prerequisites, configuration, limits, and troubleshooting.
  3. FalconForce: Microsoft Defender for Endpoint Internals 0x06: Custom Collection – Research into custom collection and automation.
  4. FalconForce: TelemetryCollectionManager – Community tooling for rule configuration management.
  5. Microsoft Learn: DeviceCustomProcessEvents Table Reference – Custom process event schema.
  6. Microsoft Learn: Create Custom Detection Rules – Detection development and alert configuration.
  7. Infernux: Defender for Endpoint: Custom Data Collection Rules – Original article by Truls Dahlsveen, November 2025.