Managing Automated Investigation and Remediation

Earn 25 points (50 with Pro) in two steps

  1. ① Read through the lesson — each section gets a ✓ as you scroll through it.
  2. ② When every section has a ✓, tap Complete lesson.

0 of 12 read · keep scrolling

✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro

Lesson: Managing Automated Investigation and Remediation in Microsoft Defender XDR

Introduction: The Shift Toward Automated Security Operations

In the modern digital landscape, the volume of security alerts generated by an enterprise environment can quickly overwhelm even the most capable security operations centers (SOC). When every suspicious process, anomalous login, or malware detection requires manual intervention, security analysts often face "alert fatigue," leading to missed threats and increased response times. This is where Automated Investigation and Remediation (AIR) within Microsoft Defender XDR becomes essential.

Automated Investigation and Remediation is a capability designed to scale your security team’s efforts by automatically analyzing alerts, determining the scope of a threat, and performing remediation actions. Instead of having a human analyst spend hours investigating a routine malware alert, Defender XDR can perform the heavy lifting—tracing the process tree, identifying affected assets, and neutralizing the threat—in a matter of minutes. By offloading these repetitive, high-volume tasks to the system, your human experts can focus their time on complex, high-value investigations that require critical thinking and strategic oversight.

This lesson explores how to configure, manage, and optimize these automated workflows. We will move beyond the basic setup to understand the underlying logic of investigation packages, the importance of remediation levels, and how to maintain the balance between automation and human oversight.


Not read yet

Understanding the Architecture of AIR

At its core, Automated Investigation and Remediation relies on a set of "playbooks." When an alert is triggered, the system initiates an automated investigation based on the entity types involved—such as files, processes, services, or registry keys. These playbooks mimic the steps a skilled analyst would take during a manual investigation.

Key Stages of an Automated Investigation

  1. Triggering: An alert is generated in the Microsoft Defender portal. Based on the alert severity and classification, the system decides whether to trigger an automated investigation.
  2. Evidence Collection: The system gathers data from the endpoint, including process trees, network connections, and file metadata. It correlates this data across other endpoints in your organization to see if the threat has spread.
  3. Analysis: The engine compares the collected evidence against a vast database of known threats and indicators of compromise (IoCs). It determines whether an entity is malicious, suspicious, or benign.
  4. Remediation: Based on the determined verdict, the system proposes or executes actions such as killing a process, quarantining a file, or isolating a device.
  5. Summary and Reporting: The entire process is documented in an investigation graph, providing the analyst with a complete picture of what happened, what the system found, and what actions were taken.

Callout: Automation vs. Manual Investigation It is a common misconception that automated investigation replaces the human analyst. In reality, automation acts as a force multiplier. It handles the "known-knowns" and the initial scoping phase, allowing the analyst to start their work with a pre-populated investigation graph rather than a blank slate. The analyst’s role shifts from "data gatherer" to "decision maker."


Not read yet

Configuring Automation Levels

One of the most critical aspects of managing AIR is setting the automation level. Microsoft Defender XDR allows you to define how much autonomy the system has when it comes to remediation. These settings are found within the "Automation levels" section of your device group configurations.

The Three Tiers of Automation

  • Full - Remediation at Full Automation: This is the most aggressive setting. If the system finds a threat and has high confidence in its assessment, it will automatically take remediation actions (like quarantining files). This is ideal for organizations that want to minimize the "dwell time" of threats.
  • Semi - Remediation with Approval: This is the recommended starting point for most organizations. The system performs the investigation and identifies the threats, but it waits for a human analyst to approve the remediation actions before they are executed. This provides a safety net while still saving the analyst the time required to perform the investigation itself.
  • No Automation: In this mode, the system only performs the investigation and provides recommendations. No actions are taken automatically, and the analyst must manually perform every remediation step. This is rarely used in production environments but may be useful in highly sensitive, legacy, or specialized systems where automated changes could break critical business processes.

Note: You can configure these levels at the device group level. This allows you to apply "Full" automation to your general workstation fleet while keeping "Semi" or "No Automation" for your sensitive server infrastructure where unintended downtime is a major concern.


Not read yet

Step-by-Step: Implementing Automated Investigation

To implement these controls, you need to navigate to the Microsoft Defender portal. Follow these steps to ensure your environment is configured correctly:

  1. Navigate to Settings: Log in to the Microsoft Defender portal and go to Settings > Endpoints > Automated investigation.
  2. Define Device Groups: If you haven't already, ensure your devices are organized into groups. This allows for granular control over which devices receive which level of automation.
  3. Set Automation Levels: Select a device group and choose the desired automation level (Full or Semi).
  4. Review Suppression Rules: Before enabling full automation, review your suppression rules. These rules prevent the system from flagging specific files or processes that you know are legitimate but might trigger a false positive alert.
  5. Monitor the Action Center: Once enabled, regularly visit the Action Center to review pending and completed actions. This is where you will approve or reject actions if you are using the "Semi" automation level.

Not read yet

The Role of the Investigation Graph

When an automated investigation runs, it generates an interactive graph. This is perhaps the most powerful tool for an analyst. The graph visualizes the entire "story" of an attack.

Elements of the Investigation Graph

  • The Root Cause: The graph identifies the starting point of the incident (e.g., a specific file execution or a phishing email).
  • The Process Tree: It shows how the malicious process spawned other processes, providing insight into the attacker's movement.
  • Affected Entities: It clearly lists every file, user, IP address, and device that was touched or influenced by the threat.
  • Evidence Collected: You can click on any node in the graph to see the raw evidence, such as command-line arguments, file hashes, and network connections.

By reviewing this graph, an analyst can verify the machine's logic. If the machine marks a file as "malicious," the analyst can look at the evidence to confirm the verdict. If the analyst disagrees, they can override the decision and prevent the file from being quarantined.


Not read yet

Best Practices for Managing AIR

Implementing automated investigation is not a "set it and forget it" task. To get the most out of the system, you must follow established industry practices.

1. Maintain a Clean Exclusion List

The most common cause of frustration with automated remediation is "false positives"—where legitimate enterprise tools or custom applications are flagged as threats. Instead of simply turning off automation, you should maintain a robust exclusion list. Use file hashes, certificate thumbprints, or path-based exclusions to tell the system which files are safe.

2. Leverage "Semi" Automation During the Pilot Phase

When you first roll out Defender XDR in your environment, do not jump straight to "Full" automation. Start with "Semi" automation for at least 30 to 60 days. This allows your team to see exactly what actions the system would have taken and verify that they align with your security policy. Once you trust the system's logic, you can selectively move specific device groups to "Full" automation.

3. Regularly Review the Action Center

The Action Center is your dashboard for all remediation activity. Even with full automation, you should audit the Action Center weekly. Look for patterns in what the system is blocking. If you see a high volume of blocked items from a specific application, it is a signal that you need to either update that application or add it to your exclusion list.

4. Integrate with SIEM/SOAR

While Defender XDR is powerful, it should not exist in a silo. Ensure that your automated investigation and remediation logs are being sent to your SIEM (Security Information and Event Management) system. This allows you to correlate threat data from your endpoints with data from your network firewalls, identity providers, and cloud infrastructure.

Warning: Be cautious when using wildcard exclusions. While it is tempting to exclude an entire folder like C:\Program Files\InternalApp\*, this can create a significant security hole. If an attacker manages to drop a malicious file into that folder, it will bypass your endpoint protection entirely. Always prefer specific hash-based exclusions over broad directory exclusions.


Not read yet

Common Pitfalls and How to Avoid Them

Even with a well-configured system, organizations often fall into common traps. Understanding these mistakes can save you significant time and prevent operational disruptions.

Mistake 1: Ignoring the "Why"

Many analysts see a "Remediation Completed" status and move on to the next alert. This is a mistake. You must understand why the threat was able to execute in the first place. Was it a missing patch? A weak password? A misconfigured GPO? If you don't address the root cause, the same threat will likely return.

Mistake 2: Over-reliance on Automation

Automation is not a replacement for security architecture. If you rely solely on AIR to stop threats, you are essentially playing "whack-a-mole." Use the data provided by automated investigations to drive your hardening efforts. If the investigations consistently show that threats are entering through a specific browser, you should tighten browser security policies globally rather than just waiting for the next alert.

Mistake 3: Lack of Stakeholder Communication

When an automated system isolates a device or deletes a file, it can disrupt a user's workflow. If the user doesn't know why their computer was isolated, they may simply reboot it or try to bypass the security controls. Ensure you have a clear communication plan for when automated actions take place.


Not read yet

Deep Dive: Customizing Investigation Logic via API

For advanced teams, the Microsoft Defender XDR API provides the ability to interact with investigations programmatically. This can be useful for integrating with custom ticketing systems (like ServiceNow or Jira) or for triggering custom scripts when an investigation completes.

Example: Retrieving Investigation Details via PowerShell

You can use the Microsoft Graph API or the Defender API to pull details about an ongoing investigation. This is useful for creating custom reports or dashboards.

# Example: Fetching a list of recent investigations
$apiUrl = "https://api.security.microsoft.com/api/investigations"
$token = Get-AuthToken # Assume a helper function to retrieve your OAuth token

$headers = @{
    "Authorization" = "Bearer $token"
    "Content-Type" = "application/json"
}

$response = Invoke-RestMethod -Uri $apiUrl -Method Get -Headers $headers

# Iterate through investigations and display their status
foreach ($investigation in $response.value) {
    Write-Host "Investigation ID: $($investigation.id)"
    Write-Host "State: $($investigation.state)"
    Write-Host "Alert ID: $($investigation.alertId)"
    Write-Host "---"
}

Explanation: This script connects to the Defender API, requests the list of active or recent investigations, and iterates through them to display the status and associated alert ID. This can be expanded to filter by date or severity, allowing your team to build a custom "live feed" of automated activities.


Not read yet

Comparison: Manual vs. Automated Workflow

Feature Manual Investigation Automated Investigation
Speed Slow (hours/days) Rapid (minutes)
Consistency Variable (human error) Consistent (rule-based)
Scoping Limited to one device Cross-device/Cross-entity
Analyst Focus Data collection Decision making/Policy hardening
Cost High (personnel intensive) Low (system overhead)

FAQ: Frequently Asked Questions

Q: Does Automated Investigation work on non-Windows devices? A: Yes, Microsoft Defender XDR extends automated investigation capabilities to Linux, macOS, and mobile platforms, though the depth of the investigation may vary depending on the platform's native capabilities and the Defender agent version.

Q: Can I stop an investigation once it has started? A: Yes, you can cancel an investigation from the investigation page in the Defender portal if you determine it is not necessary or if it is impacting system performance.

Q: What happens if an investigation conflicts with a user's work? A: If you are using "Semi" automation, you can review the proposed actions and choose to "Reject" them if they interfere with critical business operations. In "Full" automation, you may need to add the specific process or file to your exclusion list to prevent recurrence.

Q: Is there an extra cost for using AIR? A: Automated Investigation and Remediation is included as part of the Microsoft Defender for Endpoint Plan 2 and Microsoft Defender XDR licensing. There are no additional per-investigation fees.


Not read yet

Real-World Scenario: Dealing with a Phishing Campaign

Let’s look at how AIR handles a common scenario: a phishing email that drops a malicious payload.

  1. Detection: A user clicks a link in an email, and a malicious script executes on their laptop. Defender for Office 365 and Defender for Endpoint detect the suspicious activity.
  2. Trigger: An automated investigation is triggered for the endpoint.
  3. Analysis: The system identifies the process tree. It sees the web browser launching a PowerShell script, which then attempts to contact a command-and-control (C2) server.
  4. Scoping: The system checks if this same file hash or C2 connection exists on any other devices in the organization. It finds that two other users received the same email, but they haven't clicked the link yet.
  5. Remediation: The system automatically marks the initial email as malicious and removes it from the other users' inboxes. On the first user's device, it isolates the laptop from the network to prevent further communication with the C2 server and alerts the security team.
  6. Review: The security analyst receives a single, consolidated incident report. They don't have to manually search for the other emails or isolate the laptop—it’s already done.

This scenario highlights why AIR is so effective. Without it, the analyst would have had to manually find the email, search for other users who received it, delete those emails, and then investigate the infected laptop—a process that could take hours. With AIR, the response is almost instantaneous.


Not read yet

Addressing False Positives: A Proactive Strategy

False positives are the bane of any security team. To manage them effectively, you should adopt a proactive strategy rather than a reactive one.

  • Review "Suppression" Rules: If an automated investigation marks a file as malicious, and you verify it is a legitimate internal tool, look for the "Suppress" button in the investigation graph. Creating a suppression rule ensures that the same file won't trigger an investigation again in the future.
  • Analyze the "Why": Ask yourself why the file was flagged. Does it exhibit behavior similar to malware (e.g., modifying system registry keys, injecting into other processes)? If so, your internal developers might need to update the application to use more standard, less suspicious coding practices.
  • The "Audit" Approach: If you are unsure about a file, you can set the automation to "Semi" mode for a specific time frame. This allows you to observe the system's behavior without the system actually taking action, providing you the data needed to decide whether an exclusion is appropriate.

Not read yet

Advanced Troubleshooting: When AIR Fails

While the system is robust, there are times when an investigation may fail to complete or produce the expected results.

  • Connectivity Issues: If the endpoint is offline or has restricted network access, the system may not be able to collect the necessary evidence. Ensure your endpoints have the required connectivity to the Microsoft Defender cloud services.
  • Permission Issues: If the user running the process has limited permissions, the system may not be able to gather certain types of data. Ensure that the Defender service is running with the appropriate local system privileges.
  • Service Health: Check the Microsoft 365 Admin Center for any service health alerts. Sometimes, the issue isn't with your configuration but with the service itself.

Conclusion: Mastering Automated Security

Automated Investigation and Remediation is a fundamental component of a mature security posture. It transforms the security operations center from a reactive, manual-labor-intensive unit into a strategic, data-driven team. By leveraging the power of automation, you can reduce the time to remediate threats from hours to minutes, significantly lowering the risk to your organization.

However, the success of these tools depends on your willingness to engage with them. You must configure them correctly, monitor their output, and use the insights they provide to improve your overall security architecture. Remember that the goal is not just to "stop the bad guys," but to build an environment where the security team is empowered to focus on the threats that truly matter.

Key Takeaways for Your Implementation

  1. Start with "Semi" Automation: Always begin by observing the system's logic before allowing it to take autonomous action. This builds trust and ensures your environment is well-understood by the system.
  2. Leverage Device Groups: Use device groups to apply different levels of automation based on the sensitivity of the assets. A critical server should have different rules than a general-purpose marketing laptop.
  3. Prioritize Root Cause Analysis: Do not stop at remediation. Always investigate why the threat was able to occur and implement policies to prevent it from happening again.
  4. Maintain Your Exclusion Lists: Proactively manage your exclusions to minimize false positives. Use specific hashes and certificate thumbprints rather than broad, risky directory-based exclusions.
  5. Use the Investigation Graph: Treat the graph as your primary source of truth. It is the most effective way to communicate the "what, where, and how" of an incident to other stakeholders.
  6. Integrate with your Ecosystem: Ensure your SIEM or SOAR tools are receiving the output of these automated investigations to provide a unified view of your security posture.
  7. Communicate with Users: Have a plan to inform users when their devices are impacted by automated actions to avoid confusion and unnecessary helpdesk tickets.

By following these principles, you will be well on your way to building a resilient, automated, and highly effective security operations environment. The journey to a fully optimized security stack is continuous, and your active management of these tools is the key to staying ahead of modern threats.

Not read yet

Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.