Onboard Devices to Defender for Endpoint

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

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

Module: Mitigate Threats Using Microsoft Defender for Endpoint

Section: Deploy Defender for Endpoint Environment

Lesson Title: Onboard Devices to Defender for Endpoint


Introduction: The Importance of Endpoint Visibility

In the modern landscape of cybersecurity, the endpoint—whether it is a laptop, a desktop, a server, or a mobile device—has become the primary battlefield. As organizations shift away from traditional perimeter-based security models toward Zero Trust architectures, the ability to monitor, detect, and respond to threats at the device level is no longer optional; it is a fundamental requirement. Microsoft Defender for Endpoint (MDE) serves as this critical layer of defense, providing behavioral analysis, cloud-powered protection, and automated investigation capabilities.

However, the most sophisticated security platform in the world remains ineffective if the devices themselves are not properly enrolled and communicating with the service. Onboarding is the process of establishing a secure, persistent connection between a device and the Microsoft Defender portal. This connection allows the device to report telemetry, receive security intelligence updates, and execute remediation actions commanded by administrators. When you onboard a device, you are essentially giving your security operations center (SOC) eyes and ears on that machine, allowing them to track process execution, network connections, and file system changes in real-time.

This lesson focuses on the mechanics of onboarding various device types into the Microsoft Defender for Endpoint ecosystem. We will move beyond the basic concept of "installation" and explore the deployment methodologies, the technical requirements for different operating systems, the verification processes that ensure a device is actively reporting, and the best practices for managing your fleet at scale. By the end of this guide, you will have a comprehensive understanding of how to bridge the gap between an unmanaged device and a secured, monitored asset.


Not read yet

Understanding the Onboarding Lifecycle

Onboarding is not a singular event; it is a lifecycle management process. It begins with the preparation of your environment, continues through the deployment of configuration packages, and concludes with ongoing verification and maintenance. To successfully onboard devices, you must understand that different operating systems require different packages and deployment tools. For example, Windows 10 and 11 utilize built-in security features, while legacy operating systems or non-Windows platforms like Linux and macOS require the installation of specialized agents.

The onboarding process generally follows these four distinct stages:

  1. Prerequisite Validation: Ensuring that the network, identity, and hardware requirements are met before attempting any installation.
  2. Configuration Package Generation: Obtaining the unique identifiers and scripts from the Microsoft Defender portal that link the devices to your specific tenant.
  3. Deployment: Using management tools such as Microsoft Intune, Group Policy (GPO), or configuration management scripts to push the onboarding package to the target devices.
  4. Verification: Confirming that the device is correctly communicating with the Microsoft Defender portal and is appearing in the "Devices" inventory.

Callout: Onboarding vs. Enrollment While these terms are often used interchangeably, they represent distinct concepts. Enrollment typically refers to registering a device with an identity provider or a mobile device management (MDM) solution like Intune. Onboarding is the specific action of configuring the security agent on that device to report telemetry to the Microsoft Defender for Endpoint service. A device can be enrolled in Intune but not yet onboarded to Defender, meaning the device is managed but lacks the advanced threat detection capabilities provided by the Defender agent.


Not read yet

Preparation and Prerequisites

Before you distribute any configuration files, you must ensure your environment is ready to handle the incoming telemetry. The most common cause of failed onboarding is a misconfigured network or a lack of administrative permissions. Microsoft Defender for Endpoint relies on cloud connectivity; therefore, if your network blocks outbound traffic to the Microsoft data centers, the onboarding process will fail silently.

Network Connectivity Requirements

Devices must be able to reach the Microsoft Defender for Endpoint service endpoints. If your organization utilizes a proxy server or a firewall with deep packet inspection, you must ensure that the URLs associated with Defender are allow-listed. The primary endpoints include those for telemetry submission, cloud-based lookups, and security updates. It is a best practice to test connectivity from a single pilot device before rolling out to the entire organization to confirm that your network policy is not inadvertently blocking the agent.

Identity and Permissions

To onboard devices, you need appropriate permissions in the Microsoft 365 Defender portal. You must be assigned the "Security Administrator" or "Global Administrator" role to generate onboarding packages. Furthermore, the devices themselves need an identity within your environment, typically represented by their Azure Active Directory (Azure AD) or Microsoft Entra ID join status. While you can onboard non-domain-joined devices, managing them is significantly easier when they are registered in your directory, as this allows you to apply conditional access policies based on their security state.


Not read yet

Onboarding Windows Devices

Windows remains the primary target for most cyberattacks, and Microsoft has streamlined the onboarding process for its native OS significantly. There are several deployment methods available depending on your current management stack.

Method 1: Microsoft Intune

Microsoft Intune is the recommended tool for managing modern Windows devices. It provides a seamless experience for onboarding because it handles the configuration profile automatically.

  1. Navigate to the Microsoft Intune admin center.
  2. Go to Endpoint security and select Endpoint detection and response.
  3. Create a new policy, selecting the platform (Windows 10, 11, and Server) and the profile type (Endpoint detection and response).
  4. Configure the settings, specifically the "Sample sharing" and "Expedite telemetry reporting frequency" options.
  5. Assign the policy to a group of devices or users.

Once the policy is assigned, the Intune management agent on the target machine will receive the instruction to onboard. It will pull the necessary security configuration and begin reporting telemetry to the Defender portal without requiring any user intervention or manual script execution.

Method 2: Group Policy (GPO)

For organizations that rely on Active Directory and traditional domain management, Group Policy remains a powerful tool. This method is ideal for legacy environments where machines are not yet enrolled in Intune.

  1. In the Microsoft Defender portal, go to Settings > Endpoints > Onboarding.
  2. Select Group Policy from the deployment method dropdown.
  3. Download the configuration package (a ZIP file containing a script).
  4. Open your Group Policy Management Console (GPMC) and create a new GPO or edit an existing one.
  5. Navigate to Computer Configuration > Preferences > Control Panel Settings > Scheduled Tasks.
  6. Create a new immediate task that runs the onboarding script downloaded in step 3.

Warning: Script Execution Policy When using GPO or manual scripts, ensure that your environment allows the execution of PowerShell scripts. If your organization has a "Restricted" PowerShell execution policy, the onboarding script will fail. You may need to temporarily set the execution policy to "RemoteSigned" or "Bypass" for the duration of the deployment task to ensure the agent is successfully installed and configured.


Not read yet

Onboarding Non-Windows Devices (Linux and macOS)

The threat landscape is not limited to Windows. Servers, cloud infrastructure, and workstations running Linux or macOS are equally vulnerable. Microsoft has extended the reach of Defender for Endpoint to these platforms by providing native agents that integrate with the same unified portal.

Linux Onboarding

Onboarding Linux servers requires a different approach, as these systems are often managed via configuration management tools like Ansible, Puppet, or Chef.

  1. Download the onboarding package from the Microsoft Defender portal, which includes a MicrosoftDefenderATPOnboardingLinux.py script.
  2. Install the mdatp package using your distribution's package manager (e.g., yum, apt, or zypper).
  3. Deploy the onboarding script to the target Linux machines.
  4. Run the script with root privileges to apply the configuration.

The Linux agent operates as a daemon and requires specific system permissions to monitor processes and network sockets. It is crucial to verify that the mdatp service is active by running the command mdatp health. If the health check reports that the agent is not connected, check the proxy settings, as Linux agents often require explicit proxy configuration via command-line arguments.

macOS Onboarding

Onboarding macOS devices is typically handled through mobile device management (MDM) solutions like Jamf or Intune. Because of the strict security model in macOS, you must grant the Defender agent "Full Disk Access" and "System Extension" permissions.

  1. Create a configuration profile in your MDM solution.
  2. Import the Defender for Endpoint configuration files (usually XML or mobileconfig files provided by Microsoft).
  3. Deploy these profiles to the macOS devices.
  4. Install the Defender for Endpoint package (.pkg) via the MDM.

Note: System Extensions on macOS macOS requires explicit user or MDM approval for system extensions. If you do not push the correct configuration profiles via your MDM, the Defender agent will install but will be unable to monitor system activities because it lacks the necessary permissions to intercept kernel-level events. Always verify that the "System Extension" and "Full Disk Access" profiles are deployed before the agent itself.


Not read yet

Verification: Ensuring Success

After deploying the onboarding packages, you must verify that the devices are actually reporting. It is a common mistake to assume that because the script ran without error, the device is now protected.

The Detection Test

Microsoft provides a simple method to verify onboarding: the "Detection Test." On a newly onboarded device, open an elevated command prompt (or terminal on Linux/macOS) and run a specific command that simulates a benign attack.

  • Windows: powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Sleep -s 5; [System.IO.File]::WriteAllText('C:\test-MDATP-test', 'This is a test file to verify Defender for Endpoint onboarding')}"
  • Linux: curl -o /tmp/x https://secure.eicar.org/eicar.com.txt

If the device is correctly onboarded, the Defender for Endpoint agent will detect this action as a threat (the EICAR test file is a standard industry test for antivirus software) and trigger an alert in the Microsoft Defender portal. Within a few minutes, you should see an alert in the dashboard labeled "Suspicious file detected." If you do not see this alert, the device is not successfully communicating with the service.

Troubleshooting Common Issues

When devices fail to report, follow this systematic troubleshooting checklist:

  1. Connectivity: Use the Connectivity Analyzer tool provided by Microsoft to test if the device can reach the required service URLs.
  2. Time Sync: Ensure the device time is synchronized with an NTP server. MDE uses certificates for authentication, and if the system clock is off by more than a few minutes, the handshake will fail.
  3. Agent Status: Run the status check commands (e.g., mdatp health on Linux, Get-MpComputerStatus on Windows) to see if the engine is running.
  4. Duplicate IDs: If you cloned a virtual machine without properly sysprepping it, you may have multiple devices reporting the same unique ID, which causes inconsistent reporting.

Not read yet

Best Practices for Enterprise Deployment

Deploying MDE to a few machines is simple; deploying it to thousands requires a structured approach. Following these industry-standard practices will save you significant time and reduce the likelihood of operational friction.

1. Phased Rollout

Never deploy to the entire organization at once. Start with a "Pilot" group consisting of IT staff and a small subset of power users. This allows you to identify potential conflicts with existing security software, custom internal applications, or specific network configurations. Monitor this group for 48–72 hours before moving to the next phase.

2. Offboarding Readiness

Always have a plan for offboarding. While you hope to keep devices protected, machines are decommissioned, sold, or repurposed constantly. Ensure you have the offboarding scripts ready and understand how to remove a device from the portal to keep your inventory clean and accurate.

3. Monitoring Health

Use the "Device Health" dashboard in the Microsoft Defender portal. This dashboard provides a high-level view of devices that are "Inactive," "Misconfigured," or "Outdated." Treat these status reports as actionable alerts rather than passive information.

4. Integration with Existing Tools

Leverage your existing investment in management software. If you already use SCCM, Intune, or a third-party RMM tool, use those platforms to deploy Defender. Do not attempt to manually onboard devices unless you are dealing with a very small, isolated environment.

Callout: The Importance of Sensitivity Labels As you onboard devices, consider the data they handle. You can integrate MDE with Microsoft Purview to ensure that devices handling highly sensitive data have stricter security policies applied. This context-aware approach ensures that your most valuable assets receive the highest level of scrutiny.


Not read yet

Comparison Table: Deployment Methods

Method Best For Pros Cons
Intune Modern, Cloud-managed Seamless, automated, policy-driven Requires Intune license/setup
GPO Traditional AD environments Familiar, highly controllable Limited to domain-joined devices
Local Script Small batches, testing Simple, no infrastructure required Not scalable, hard to track
MDM (macOS) Non-Windows fleets Native integration with OS security Requires specific MDM configuration

Common Mistakes and How to Avoid Them

Ignoring Telemetry Data

A common mistake is onboarding devices but failing to configure the "Telemetry Reporting Frequency." By default, some devices may only report once every few hours. If you are investigating an active incident, you need real-time data. Always ensure that your onboarding policy includes a setting for "Expedite Telemetry" to ensure that the agent sends data to the cloud as soon as a security event occurs.

Failing to Address Legacy Systems

Many organizations assume that older operating systems do not need to be onboarded. However, legacy servers are often the most vulnerable points in a network. Microsoft provides support for older Windows versions (like Windows Server 2012 R2 or 2016) through the "Unified Agent." Ensure you are using the correct agent version for these legacy systems, as the modern built-in agent will not work on them.

Overlooking Proxy and Firewall Configurations

If your organization uses a proxy, the Defender agent will not be able to "phone home" unless it is explicitly configured to use that proxy. Many administrators forget this, leading to devices that appear "Active" in the console but never actually send any threat alerts. Always configure the proxy settings via the registry (on Windows) or the configuration file (on Linux/macOS) during the deployment phase.

Lack of Documentation

When you onboard thousands of devices, it is easy to lose track of which policy applies to which group. Maintain documentation that maps your deployment groups to the specific onboarding configuration packages. If you have different policies for servers versus workstations, ensure these are clearly labeled and audited regularly.


Not read yet

Advanced Onboarding Considerations: Server Environments

Servers require a different level of attention compared to user workstations. Unlike a laptop that might be turned off at night, servers are expected to run 24/7, and they often host critical business applications. When onboarding servers, consider the following:

  1. Performance Impact: Even though the MDE agent is lightweight, it still performs real-time scanning. On high-performance database servers, you may need to configure "Exclusions" for specific directories or processes that are known to be safe but are resource-intensive.
  2. Server-Specific Policies: Create separate configuration profiles for servers. These might include different retention periods for forensic data or different alert thresholds.
  3. Automated Deployment: Use Infrastructure as Code (IaC) tools like Terraform or Azure Resource Manager (ARM) templates to onboard servers as they are provisioned. This ensures that every new server is "born secure" and enters the network already reporting to Defender.

Not read yet

Frequently Asked Questions (FAQ)

Q: Can I onboard a device that doesn't have an internet connection? A: No, Microsoft Defender for Endpoint requires cloud connectivity to function. If you have an air-gapped network, you cannot use the standard Defender for Endpoint service. You would need to look into an on-premises solution or a different security architecture.

Q: How long does it take for a device to appear in the portal after onboarding? A: Typically, it takes between 15 to 60 minutes for a device to show up in the "Devices" inventory after the onboarding script has successfully run. If it takes longer, check the Connectivity Analyzer tool.

Q: Does onboarding a device affect its performance? A: The MDE agent is designed to have a minimal performance footprint. In most modern environments, the impact is negligible. However, if you are running legacy software or specialized hardware, perform a pilot test to ensure there are no compatibility issues.

Q: What happens if I move a device to a different management group? A: The device will inherit the policies of the new group. If the new group has a different onboarding configuration, the agent will automatically update its settings to match the new policy.

Q: Can I use multiple antivirus solutions alongside Defender? A: While MDE can run in "Passive Mode" alongside other antivirus solutions, it is generally recommended to use Defender as your primary security product for the best level of integration and performance. Running multiple real-time scanners can lead to system instability and performance degradation.


Not read yet

Key Takeaways

As we conclude this lesson on onboarding devices to Microsoft Defender for Endpoint, keep these core principles in mind to ensure your deployment is successful:

  • Connectivity is King: The fundamental requirement for MDE is the ability for the device to reach Microsoft cloud services. Always verify network paths and proxy configurations before deployment.
  • Use Centralized Management: Avoid manual, one-off installations. Use tools like Microsoft Intune, GPO, or MDM to deploy at scale, which ensures consistency and makes auditing much easier.
  • Verification is Not Optional: Never assume a deployment was successful. Always perform a detection test (like the EICAR test) to confirm that the agent is actively reporting and that alerts are reaching the dashboard.
  • Lifecycle Management Matters: Onboarding is just the beginning. Regularly audit your device inventory, remove inactive devices, and keep your agents updated to ensure you are protected against the latest threats.
  • Tailor Your Approach: One size does not fit all. Recognize the differences between workstations, servers, and non-Windows operating systems, and create specific deployment strategies for each.
  • Prioritize Security Permissions: Ensure that the service accounts or management tools used for onboarding have the correct permissions, and conversely, that the end-user devices have the appropriate restrictions applied to prevent tampering with the security agent.
  • Document and Audit: Keep clear records of your deployment architecture. Regular audits of your onboarding policies will prevent "configuration drift" and ensure that new devices are automatically secured as they join your infrastructure.

By following these practices, you are not just installing software; you are building a resilient, observable, and proactive security posture that will serve your organization well in the face of evolving digital threats. Remember that the goal of onboarding is to transform every device in your fleet into a proactive sensor that feeds the broader security ecosystem, providing the data necessary to stop attacks before they reach critical systems.

Not read yet

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