Configure Defender for Identity Sensors

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 10 read · keep scrolling

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

Configure Defender for Identity Sensors: A Comprehensive Guide

Introduction: Why Identity is the New Perimeter

In the modern landscape of cybersecurity, the traditional network perimeter—the firewall—has effectively dissolved. With the rise of cloud services, remote work, and hybrid infrastructure, identities have become the primary target for attackers. When an adversary gains control of a user account, they do not need to "break in" to your network; they simply log in. This is why protecting your directory services, specifically Active Directory Domain Services (AD DS), is the most critical task for any security administrator.

Microsoft Defender for Identity (MDI) acts as a specialized layer of defense that monitors your domain controllers, which are the "keys to the kingdom." By analyzing the traffic, authentication requests, and behavioral patterns originating from these servers, Defender for Identity can detect lateral movement, privilege escalation, and reconnaissance activities that traditional antivirus or endpoint detection tools often miss.

The heart of this protection is the Defender for Identity sensor. This is a lightweight agent installed directly on your domain controllers. In this lesson, we will explore exactly what these sensors do, how to deploy them correctly, how to configure them for optimal performance, and how to ensure they remain healthy. Understanding the sensor architecture is not just a technical requirement; it is a foundational step in building a resilient security posture.


Not read yet

Understanding the Sensor Architecture

Before we dive into the installation and configuration, we need to understand what happens "under the hood." A Defender for Identity sensor is not just a simple log-forwarder. It is a sophisticated piece of software that performs real-time traffic analysis. When you install the sensor on a domain controller, it hooks into the network interface cards (NICs) to inspect traffic in real-time without introducing significant latency.

How Sensors Capture Traffic

The sensor monitors the traffic flowing to and from the domain controller. It looks for specific protocols such as Kerberos, NTLM, and LDAP. By inspecting these protocols, the sensor builds a map of the identity landscape. For example, it tracks who is authenticating to which machine, what resources they are requesting, and whether they are attempting to perform suspicious actions like "Pass-the-Ticket" or "DCSync" attacks.

The sensor performs packet capture locally. It processes this data, strips out sensitive information, and sends only the relevant security metadata to the Microsoft Defender cloud portal. This is a crucial distinction: the sensor does not upload your raw network traffic to the cloud. Instead, it uploads the extracted telemetry needed for the cloud-based analytics engine to correlate events and alert you to potential threats.

Deployment Prerequisites

To install a sensor successfully, your environment must meet specific criteria. If these are not met, you will likely encounter issues during installation or find that your sensors are not reporting data correctly.

  • Operating System: You must be running a supported version of Windows Server. Generally, this means Windows Server 2016 or later. Always check the official Microsoft documentation for the latest support matrix, as older server versions may be deprecated.
  • Time Synchronization: Domain controllers must have their time synchronized accurately. If the time on the sensor is skewed significantly from the domain time, authentication tickets (like Kerberos) will be rejected, and the sensor will fail to correlate events.
  • Network Connectivity: The sensor needs to communicate with the Defender for Identity cloud service via HTTPS (port 443). If you have a strict firewall, you must ensure that the sensor can reach the required service endpoints.
  • Memory and CPU: While the sensor is lightweight, it does consume resources. You should ensure that your domain controllers have sufficient headroom to handle the small overhead of the packet inspection engine.

Callout: Sensor vs. Standalone Sensor It is important to distinguish between a "Sensor" and a "Standalone Sensor." A Sensor is installed directly on the domain controller. This is the recommended approach because it captures traffic directly from the source. A Standalone Sensor is a separate server that receives traffic via port mirroring (SPAN) from a network switch. While useful in legacy environments where you cannot install software on domain controllers, it is significantly more complex to configure and maintain. Always prefer the direct sensor installation whenever possible.


Not read yet

Step-by-Step Installation Process

Installing a Defender for Identity sensor is a straightforward process, but it requires careful attention to detail. Before you begin, ensure you have the necessary permissions in the Microsoft Defender portal and administrative access to the domain controller.

Step 1: Download the Sensor Setup Package

  1. Sign in to the Microsoft Defender portal.
  2. Navigate to Settings > Identities > Sensors.
  3. Click on the Add sensor button.
  4. Download the installation package (.zip file). This package contains the installer and your unique access key.

Step 2: Prepare the Domain Controller

Before running the installer, ensure that the domain controller is patched and that the necessary .NET Framework versions are installed. It is also good practice to check that no other intensive network monitoring tools are conflicting with the sensor's ability to access the network stack.

Step 3: Run the Installer

  1. Copy the downloaded installer to the domain controller.
  2. Run the executable. If you are doing this in a production environment, you might prefer to run it via command line for automation purposes.
  3. During the installation, you will be prompted to enter the Access Key you downloaded earlier. This key links your sensor to your specific Microsoft 365 tenant.
  4. Once the installation finishes, the sensor service will start automatically. It may take a few minutes for the sensor to register with the cloud portal and begin appearing as "Active."

Step 4: Verification

Once the installation is complete, return to the Microsoft Defender portal. You should see the new sensor listed under the Sensors tab. Check the status:

  • Status: Should be "Running."
  • Version: Ensure it is the latest version.
  • Last Seen: Should be very recent (within the last few minutes).

Tip: Automating Deployment For large environments with dozens or hundreds of domain controllers, do not install sensors manually. Use a software deployment tool like Microsoft Endpoint Configuration Manager (MECM) or a PowerShell script deployed via Group Policy. You can use the command-line arguments provided in the installer package to perform a "silent" installation, which includes passing the Access Key automatically.


Not read yet

Configuring Sensor Settings for Maximum Efficacy

Once the sensor is installed, the work is not finished. You must configure the sensor settings within the Defender portal to ensure it is capturing the right information and ignoring irrelevant noise.

Domain Controller Monitoring

In the portal, you can configure which domain controllers should be monitored. By default, you should aim to have a sensor on every domain controller in your forest. If you have an environment with multiple domains, ensure that all domain controllers across all domains are covered. If you leave a domain controller unmonitored, an attacker can target that specific machine to perform reconnaissance without triggering alerts.

Directory Services Accounts (DSA)

The sensor needs a way to query your Active Directory to gather user and group information. This is done using a Directory Services Account (DSA). You should configure this account in the portal settings.

  • The DSA does not need "Domain Admin" privileges.
  • A standard user account with read-only access to the domain is sufficient.
  • Ensure this account is not used for other purposes to keep your audit trails clean.

Event Collection

Defender for Identity relies heavily on Windows Event Logs. While the sensor captures network traffic, it also reads events from the domain controllers. You should configure your domain controllers to forward specific events to the sensor. This includes events related to:

  • Account creation and deletion.
  • Group membership changes.
  • Failed and successful logon attempts.
  • Password changes.

To enable this, you can use Group Policy to configure "Advanced Audit Policy" settings on your domain controllers. This ensures that the logs contain the granular detail that Defender for Identity needs to build a complete picture of user behavior.

Callout: Why Event Logs Matter While network traffic gives us the "what" (e.g., someone is trying to access a file share), event logs give us the "who" and the "context." For instance, if an attacker attempts a brute-force attack, the network traffic shows the volume of authentication requests. The event logs confirm the account being targeted and whether the account was locked out. Combining both sources allows Defender to distinguish between a legitimate user forgetting their password and a malicious actor attempting to compromise a service account.


Not read yet

Common Pitfalls and How to Avoid Them

Even with a perfect installation, administrators often fall into traps that degrade the effectiveness of their deployment. Being aware of these issues is the first step toward a robust security configuration.

1. Ignoring Sensor Health Alerts

The Microsoft Defender portal provides health alerts for your sensors. These alerts might indicate that a sensor has stopped communicating, is experiencing high CPU usage, or is unable to read specific event logs. Many administrators ignore these, assuming they are "transient" issues.

  • Avoidance: Set up automated notifications. If a sensor goes offline, your security team should be notified immediately via email or an integration with your SIEM (Security Information and Event Management) system. An offline sensor is a blind spot.

2. Over-filtering Traffic

Some administrators, worried about performance, try to exclude certain types of traffic or specific subnets from the sensor's monitoring scope. While this can reduce the load on the sensor, it often leads to missing critical signals.

  • Avoidance: Only use exclusion filters if you are absolutely certain that the traffic is benign and high-volume (e.g., a known, trusted backup service that generates massive amounts of noise). When in doubt, let the sensor analyze the traffic; the cloud engine is designed to filter out the noise.

3. Neglecting Synchronization

As mentioned earlier, time synchronization is vital. If your domain controllers are drifting, the correlation between network events and event logs will break. This results in "false negatives" where an attack occurs but no alert is triggered because the events don't line up in the timeline.

  • Avoidance: Implement a reliable NTP (Network Time Protocol) strategy across your entire domain. Monitor the time offset of your domain controllers as part of your standard server health checks.

4. Failing to Update Sensors

Microsoft frequently updates the Defender for Identity sensor to support new protocols and improve detection logic. Running an outdated sensor means you are missing out on the latest security intelligence.

  • Avoidance: Use the "Automatic Update" feature in the Defender portal. This allows Microsoft to push updates to your sensors, ensuring they are always running the latest code without requiring manual intervention.

Not read yet

Advanced Troubleshooting Techniques

When a sensor is not behaving as expected, you need a systematic approach to troubleshoot it. Do not start by reinstalling the sensor; start by checking the logs.

Checking the Sensor Logs

The Defender for Identity sensor logs are stored locally on the domain controller. You can find them in the installation directory (usually C:\Program Files\Azure Advanced Threat Protection Sensor\Version X.X\Logs). The most important file is the Microsoft.Tri.Sensor.Updater.log and the primary service log.

  • Look for "Error" or "Critical" entries.
  • Common errors include connectivity issues (can't reach the cloud) or access denied errors (the sensor service account doesn't have the right permissions).

Using the Connectivity Tool

Microsoft provides a connectivity tool that you can run from the domain controller. This tool tests the connection between the server and the various endpoints required for Defender for Identity.

  • Run the tool to check if port 443 is open.
  • Verify that the sensor can resolve the required DNS names.
  • If the tool reports a failure, check your local firewall or your proxy server settings.

Analyzing Traffic Capture

If you suspect the sensor is not capturing traffic, you can use a tool like Wireshark on the domain controller to verify that traffic is actually hitting the NIC. If Wireshark sees the traffic but the Defender sensor does not, you might have a conflict with another security agent or a network driver issue.

Feature Sensor (On-Prem) Standalone Sensor
Placement Directly on DC Separate server
Traffic Source Local NIC SPAN/Port Mirroring
Complexity Low High
Recommended Yes Only if necessary

Not read yet

Best Practices for a Resilient Identity Defense

To truly maximize the value of your Defender for Identity deployment, you should integrate it into your broader security operations. It is not a "set and forget" system.

Integrate with SIEM/SOAR

Defender for Identity should be feeding alerts into your SIEM (such as Microsoft Sentinel). This allows your security analysts to see identity alerts alongside alerts from your endpoints, cloud apps, and email. When you see an identity alert (e.g., "Suspicious authentication") correlated with an endpoint alert (e.g., "Malicious process started"), you have a much higher confidence that a compromise is occurring.

Review Alerts Regularly

The "Alerts" dashboard in the Microsoft Defender portal is your command center. Do not let alerts pile up. Even if an alert turns out to be a "false positive," you should investigate it and mark it as such. This helps the system learn about your specific environment and improves the accuracy of future detections.

Focus on Service Accounts

Service accounts are a major weak point in almost every organization. They are often over-privileged, have passwords that never change, and are used across multiple machines. Use Defender for Identity to identify which service accounts are being used in suspicious ways, and then work to remediate them by moving toward Managed Service Accounts (gMSAs) or shifting to modern authentication methods.

Table: Monitoring Checklist

Task Frequency Purpose
Check Sensor Status Daily Ensure all DCs are covered
Review New Alerts Daily Detect active threats
Verify Time Sync Weekly Prevent correlation errors
Audit Sensor Versions Monthly Ensure latest features
Clean Up Stale Accounts Quarterly Reduce attack surface

Not read yet

Common Questions: Defender for Identity

Q: Does installing the sensor slow down my domain controller? A: The sensor is designed to be extremely lightweight. It uses a non-intrusive packet capture mechanism. In almost all production environments, the performance impact is negligible (less than 1% CPU usage).

Q: Can I install the sensor on a read-only domain controller (RODC)? A: Yes, you can. However, keep in mind that an RODC has limited capabilities compared to a writable domain controller. The sensor will still provide visibility, but you will not be able to detect certain types of changes that are not replicated to the RODC.

Q: What happens if the sensor loses connection to the cloud? A: The sensor will continue to collect data locally for a short period. Once connectivity is restored, it will upload the cached data. If the outage is prolonged, you may lose visibility into that period, but the domain controller will continue to function normally.

Q: Do I need a separate sensor for every forest? A: Yes, if you have a multi-forest environment, you need to deploy sensors in every forest to get full visibility. You will need to manage these sensors within the context of your Defender for Identity configuration.


Not read yet

Industry Recommendations and Security Standards

When deploying identity protection, you are effectively implementing a core component of the Zero Trust architecture. Industry standards, such as the CIS Benchmarks and NIST guidelines, emphasize the importance of monitoring authentication traffic.

The Principle of Least Privilege

Always ensure that the account used by the sensor to query Active Directory has the minimum permissions required. It does not need to be a Domain Admin. By restricting this account, you prevent the sensor itself from becoming a vector for privilege escalation.

Protecting the Sensor

The sensor is a privileged component. If an attacker gains administrative access to the domain controller, they could potentially disable or tamper with the sensor. This is why you must treat your domain controllers as "Tier 0" assets. Use strict access control lists (ACLs), enable Credential Guard, and ensure that only a very limited number of administrators have access to these servers.

Regular Audits

Conduct a periodic audit of your identity security configuration. Are there any domain controllers that were added recently that don't have sensors? Are there any sensors that have been offline for more than 24 hours? A formal audit process ensures that your "coverage" remains at 100%.


Not read yet

Summary and Key Takeaways

Configuring Microsoft Defender for Identity sensors is an essential task for any organization that relies on Active Directory. By placing sensors directly on your domain controllers, you gain deep visibility into the heart of your network, allowing you to detect sophisticated identity-based attacks that would otherwise remain hidden.

Here are the key takeaways from this lesson:

  1. Direct Sensor Installation is Best: Always prioritize installing sensors directly on domain controllers rather than using standalone sensors with port mirroring. This ensures the most accurate and reliable data collection.
  2. Time Synchronization is Critical: MDI relies on precise time stamps to correlate authentication events. Ensure your entire infrastructure is synchronized to a reliable NTP source to avoid gaps in security telemetry.
  3. Use Automation for Deployment: For environments with multiple domain controllers, use deployment tools and silent installation scripts to ensure consistency and speed. Never rely on manual installation for large-scale environments.
  4. Monitor Sensor Health: An offline sensor is a blind spot. Integrate sensor health alerts into your existing monitoring and alerting workflows to ensure your security team is notified immediately of any issues.
  5. Focus on Data Context: Network traffic alone is not enough. Ensure your domain controllers are configured to forward relevant event logs, as the combination of network data and event logs is what makes MDI so powerful.
  6. Maintain and Update: Keep your sensors updated to the latest version to benefit from Microsoft's ongoing research and intelligence updates. Use the automatic update feature to minimize manual overhead.
  7. Integrate for Maximum Value: Don't treat MDI as an isolated tool. Feed its alerts into your SIEM or SOAR platform to enable correlation with other security signals across your organization.

By following these practices, you can build a formidable defense against identity-based threats. Protecting your directory services is the single most effective way to prevent attackers from gaining a foothold in your network, and the Defender for Identity sensor is your primary tool for achieving this goal. Take the time to configure them correctly, monitor them diligently, and keep your infrastructure patched and healthy. Your identity is your new perimeter—defend it with everything you have.

Not read yet

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