Defender for Endpoint: Intune EDR Onboarding
Zero-touch onboarding of Windows 10 & 11 endpoints to Microsoft Defender for Endpoint (MDE) using Intune Endpoint Detection and Response (EDR) policies and Tamper Protection.
Overview
Microsoft Defender for Endpoint (MDE) is Microsoft's enterprise endpoint security platform providing behavioral cyber threat detection, automated investigation, vulnerability management, and incident response.
Integrating MDE with Microsoft Intune replaces manual script execution and GPO onboarding packages with cloud-native deployment:
- Service-to-Service Connector: Intune communicates directly with the Microsoft Defender XDR security portal (
security.microsoft.com). - Endpoint Detection and Response (EDR) Policy: Intune distributes the tenant-specific telemetry onboarding package silently via the built-in Windows MDM channel.
- OS-Level Sense Engine: The Windows kernel telemetry sensor service (
Sense) starts automatically, connects to Defender cloud endpoints, and initiates continuous behavioral reporting. - Device Risk Score Integration: MDE shares endpoint risk level (
Low,Medium,High) back to Intune to dynamically evaluate device compliance and block compromised devices via Conditional Access.
---
When to Use
| Capability | Recommended Configuration | Purpose |
|---|---|---|
| All Corporate Endpoints (Win 10/11) | EDR Policy (Auto Onboard) | Silent background onboarding without running .cmd packages or third-party agents. |
| Tamper Protection | Mandatory Enabled (Cloud Managed) | Prevents malware or local rogue administrators from disabling antivirus/EDR services. |
| Device Compliance Integration | Machine Risk Score <= Clear/Low | Quarantines compromised machines from Microsoft 365 until SOC remediation. |
| Sample Sharing | All / Safe Samples | Uploads unknown suspicious binaries to Microsoft cloud sandbox for deep detonation. |
---
Prerequisites
Tenant & Licensing Requirements:
- Defender for Endpoint License: Microsoft 365 E5, E5 Security, Windows Enterprise E5, or MDE Plan 2.
- Service Connector Enabled: Intune Admin Center > Endpoint security > Microsoft Defender for Endpoint > Set connection status to Available.
- Admin Roles: Security Administrator and Intune Administrator.
Endpoint Requirements:
- Windows 11 or Windows 10 (1709+).
- Outbound HTTPS (443) access to:
*.endpoint.security.microsoft.com*.events.data.microsoft.com*.blob.core.windows.net
---
Portal Path
Microsoft Intune Admin Center (https://intune.microsoft.com)
└── Endpoint security
├── Microsoft Defender for Endpoint (Tenant connector)
└── Endpoint detection and response
└── Create Policy > Windows 10, Windows 11, and Windows Server
└── Profile: Endpoint detection and response---
Step-by-Step Implementation
Step 1: Enable the Intune-to-Defender Service Connection
- Navigate to Intune Admin Center > Endpoint security > Microsoft Defender for Endpoint.
- Under Endpoint Security Evaluation settings:
- Set Connect Windows devices to Microsoft Defender for Endpoint:
On. - Set Allow Microsoft Defender for Endpoint to enforce Endpoint Security Configurations:
On.
- Open Microsoft Defender XDR Portal (
security.microsoft.com) > Settings > Endpoints > Advanced features:
- Enable Microsoft Intune connection:
On. - Enable Tamper protection:
On.
Step 2: Create Intune EDR Onboarding Policy
- Go to Endpoint security > Endpoint detection and response > Create Policy.
- Platform:
Windows 10, Windows 11, and Windows Server| Profile:Endpoint detection and response. - Configure settings:
- Auto populate onboarding blob:
Auto populate from connector(no manual file import required). - Sample sharing for all files:
Yes. - Telemetry reporting frequency:
Normal(orExpeditefor high-security environments).
- Assignments: Assign to
All Corporate Windows Devices.
Step 3: Configure Device Compliance Risk Rule
- Go to Devices > Compliance > Create Policy > Windows 10 and later.
- Under Device Health:
- Set Require the device to be at or under the machine risk score:
Clear(orLow).
- If an endpoint encounters ransomware or an active breach, MDE flags the device risk as
High, Intune marks it Non-Compliant, and Conditional Access cuts access to corporate emails and files immediately.
---
PowerShell Automation
Verify MDE Sense Service Status Locally on Endpoint:
# Check state of Windows Defender Advanced Threat Protection Service (Sense)
Get-Service -Name "Sense" | Select-Object Name, DisplayName, Status, StartType
# Query onboarding registry status
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows Advanced Threat Protection\Status" |
Select-Object OnboardingState, OrgId(OnboardingState 1 indicates fully onboarded).
Run Official Microsoft Defender for Endpoint Detection Test:
# Triggers a benign simulation alert to verify end-to-end cloud pipeline
# Run in elevated Command Prompt (cmd.exe)
powershell.exe -NoExit -ExecutionPolicy Bypass -WindowStyle Hidden $ErrorActionPreference = 'silentlycontinue';(New-Object System.Net.WebClient).DownloadFile('http://127.0.0.1/1.exe', 'C:\\test-WDATP-test\\invoice.exe');Start-Process 'C:\\test-WDATP-test\\invoice.exe'Within 5 minutes, an active alert named "Suspicious file created" should appear in security.microsoft.com.
---
Microsoft Graph Automation
Check Tenant MDE Onboarding Settings via Graph:
Connect-MgGraph -Scopes "DeviceManagementServiceConfig.Read.All"
# Inspect Microsoft Defender for Endpoint connector settings
Get-MgDeviceManagementWindowsDefenderAtpStatus |
Select-Object lastConnectionDateTime, state, windows10EnterpriseEditionHealth, isConfigurationSettingsEnforced---
Verification Checklist
Diagnostic Logs & Channels
| Channel / Tool | Log Location | Purpose |
|---|---|---|
| Sense Operational Event Log | Applications and Services Logs > Microsoft > Windows > SENSE > Operational | Logs cloud connection failures, telemetry buffering, and certificate validation. |
| MDE Client Analyzer Tool | MDEClientAnalyzer.cmd (Downloadable diagnostic utility) | Deep diagnostic script validating URLs, proxy settings, certificates, and OS prerequisites. |
| Windows Defender Operational | Microsoft-Windows-Windows Defender/Operational | Logs real-time AV protection events, signature updates, and blocked threats. |
---
Troubleshooting Matrix
| Error Code / Symptom | Root Cause | Exact Resolution |
|---|---|---|
| Event ID 5: Cloud handshake failed | Endpoint cannot reach Microsoft cloud telemetry URLs due to SSL inspection or proxy. | Bypass SSL inspection/decryption for *.endpoint.security.microsoft.com on corporate proxy/firewall. |
| Sense service stops immediately | Machine is running non-supported OS edition (Windows Home edition does not support MDE). | Upgrade endpoint to Windows 10/11 Pro, Enterprise, or Education. |
| OnboardingState = 0 | The EDR profile has not synced from Intune or has failed to apply. | Run Sync in Company Portal. Check Device Configuration profile status in Intune console. |
| Tamper Protection Disabled Locally | Tenant-level tamper protection is not toggled, or device is managed by conflicting GPO. | Ensure Tamper Protection is enabled in Defender Security portal and no legacy GPO disables it. |
---
Production Best Practices
Enable Automated Investigation and Remediation (AIR):
In Defender portal settings, set your device groups remediation level to Full - remediate threats automatically. This allows MDE to quarantine malware and kill malicious processes without waiting for manual SOC approval.
Never Intercept MDE TLS Traffic:
Microsoft Defender telemetry relies on mutual TLS authentication and certificate pinning. Deep packet inspection (SSL Decryption) by firewalls (Palo Alto, Fortinet, Zscaler) will break the Sense engine connection.
---
MD-102 Exam Notes
High-Frequency Exam Objectives & Traps:
- Automated Onboarding: When creating an EDR policy in Intune, you do not need to upload the manual onboarding package file; select Auto populate from connector.
- Tamper Protection Priority: Tamper Protection overrides local registry keys and Group Policies that attempt to disable real-time protection.
- Machine Risk Score: The machine risk score is calculated in MDE and ingested by Intune Compliance Policies, which then trigger Conditional Access.
---