sarah_bioni
ServiceNow Employee

When testing or troubleshooting the Microsoft Defender incident ingestion, you may need to reprocess a specific incident that was already ingested. This article describes how to remove the existing ingestion artifacts for that record and re-trigger the ingestion event through a background script. This procedure is intended for non-production environments.

 

Background

Each Defender incident ingested into ServiceNow is stored as a raw incident record. That raw record is linked to the Defender Incident to Task record and, if one was generated, to a Security Incident (SIR). Because the ingestion event is only triggered for new data, an existing raw record cannot be reprocessed by simply re-running ingestion. The steps below remove the linked artifacts and re-queue the raw record for processing.

Resolution Steps

  1. Identify the raw record. Open the Security Incident generated from the Defender incident and click the incident number to open the internal incident import record that contains the raw data. Copy its sys_id.

  2. Delete the related Defender Incident to Task record. Open the raw record and, in the related list Defender Incident to Task, delete the associated row.

  3. Delete the generated Security Incident, if one exists. If a SIR was created from this Defender incident, delete it.

  4. Run the reprocessing background script. Replace the placeholder with the sys_id from step 1, and run the script.

Note:

The Microsoft Defender ingestion profile used to ingest the incident must be active.

Recommendation: Add a condition to the ingestion profile filter so that only the incidents with the specific Defender incident IDs you want to reprocess are retrieved and processed. This keeps the test scope controlled and prevents unrelated incidents from being ingested or reprocessed.

 

var current = new GlideRecord('sn_sec_def_sntl_incident_raw');
if (current.get('[sys_id defender incident raw]')) {
    if (current.profile.use_coalesce) {
        gs.eventQueue('sn_sec_def_sntl.aggregated_incidents', current);
    } else {
        gs.eventQueue('sn_sec_def_sntl.unaggregated_incidents', current);
    }
}
Version history
Last update:
2 hours ago
Updated by:
Contributors