MDE + Intune Integration Guide
Complete guide to deploying Microsoft Defender for Endpoint via Intune โ NGAV, ASR rules, EDR, Automated Investigation & Response, Threat & Vulnerability Management, and Advanced Hunting KQL.
๐ Overview & Licensing
๐ MDE Plan Comparison
| Feature | MDE P1 | MDE P2 |
|---|---|---|
| NGAV / Antivirus | โ | โ |
| ASR Rules | โ | โ |
| Device Control (USB) | โ | โ |
| EDR | โ | โ |
| Automated Investigation (AIR) | โ | โ |
| Threat & Vulnerability Mgmt | โ | โ |
| Advanced Hunting (KQL) | โ | โ |
๐ License Bundles
- MDE P1 โ M365 Business Premium, M365 E3
- MDE P2 โ M365 E5, Defender 365 P2 add-on
- Mobile (iOS/Android): Separate MDE mobile license
- macOS/Linux: Included in MDE P1/P2
- Servers: MDE for Servers license (separate SKU)
๐ Onboarding via Intune
๐ป Windows Onboarding (MDE Connector)
Enable MDE connector in Intune
Intune admin center โ Endpoint security โ Microsoft Defender for Endpoint โ Connect.
Configure Windows onboarding profile
Endpoint security โ Endpoint detection and response โ Create policy โ Windows 10/11 โ Onboard MDE.
Assign to All Devices group
Assign the EDR policy to All Windows devices or staged group.
Verify in MDE portal
security.microsoft.com โ Devices โ should appear within 24 hours of policy applying.
โ๏ธ MDE Integration Settings
- Allow Microsoft Defender for Endpoint to enforce Endpoint Security Configurations โ Enable
- Connect Android devices to MDE โ Enable
- Connect iOS/iPadOS devices to MDE โ Enable
- Connect Windows devices to MDE โ Enable
- MDE security settings management enables bi-directional policy sync
๐ฑ iOS/Android MDE App
- Deploy Microsoft Defender app via Intune (VPP / managed)
- Requires MDE mobile license
- App Configuration policy sets onboarding mode
- Provides: Web protection (phishing), network protection, jailbreak detection
- Risk signals sent to Intune for Conditional Access
๐ Mobile Threat Defense (MTD)
- MDE acts as MTD partner in Intune
- Device risk levels: Clear, Low, Medium, High
- Compliance policy: Max allowed threat level = Medium
- Conditional Access blocks high-risk mobile devices
๐ macOS Onboarding
- Deploy MDE via Intune PKG (VPP or LOB)
- Requires system extension approval profile
- PPPC (Privacy Preferences) profile for Full Disk Access
- Onboarding package from MDE portal โ exported as mobileconfig
- Supported: macOS 11 (Big Sur) and later
๐ Required Profiles for macOS
- System Extensions: Allow MDE kernel extension
- Privacy Preferences (PPPC): Full Disk Access for MDE
- Network Filter: MDE web protection
- Notifications: Allow MDE alerts to appear
- Onboarding blob: Activates MDE for the tenant
๐ฆ NGAV & Antivirus Policy
๐ก๏ธ Antivirus Policy Settings
- Cloud protection: Enabled (Block at First Sight)
- Behavior monitoring: Enabled
- Real-time protection: Enabled
- PUA protection: Block (Potentially Unwanted Apps)
- Submit samples: Send safe samples automatically
- Scan type: Quick scan daily; Full scan weekly
๐ Tamper Protection
- Prevents local users/apps from disabling MDE
- Enable via Intune: Endpoint security โ Antivirus โ Tamper protection
- Also available via MDE portal (tenant-wide)
- Requires MDE onboarding to be active first
- Highly recommended for all production devices
โ๏ธ Attack Surface Reduction (ASR) Rules
๐ Key ASR Rules
| Rule Name | GUID (short) | Recommended Mode |
|---|---|---|
| Block Office apps creating executable content | 3b576869... | Block |
| Block Office apps injecting code into other processes | 75668c1f... | Block |
| Block JS/VBS from launching downloaded executables | d3e037e1... | Block |
| Block credential stealing from LSASS | 9e6c4e1f... | Block |
| Block persistence via WMI event subscription | e6db77e5... | Block |
| Block untrusted/unsigned processes from USB | b2b3f03d... | Block |
| Block Adobe Reader from creating child processes | 7674ba52... | Block |
| Block macro obfuscation in Office files | 5beb7efe... | Audit โ Block |
๐ EDR โ Endpoint Detection & Response
๐ EDR Capabilities
- Continuous behavioral monitoring of processes, network, files
- Timeline view of all endpoint activity
- Alert queue with severity classification
- Incident correlation across devices and users
- 6 months of raw event data stored (MDE P2)
- Live response: remote shell to investigate device
โก Alert Severity Levels
- Critical โ Immediate action: ransomware, credentials theft
- High โ Action within 1 hour: lateral movement, persistence
- Medium โ Investigate same day: suspicious activity
- Low โ Review when possible: informational anomalies
- Informational โ Review in bulk
๐ค Automated Investigation & Response (AIR)
๐ค AIR Process
- Alert triggers automatic investigation
- MDE collects artifacts: processes, network connections, registry
- AI engine determines verdict: Clean / Malicious / Suspicious
- Automatic remediation actions proposed
- Actions require approval (Semi-Auto) or auto-apply (Full Auto)
โ๏ธ Automation Level
| Level | Behavior |
|---|---|
| Full automation | All remediation auto-approved |
| Semi โ core folders | Only auto-approve non-critical folder actions |
| Semi โ non-temp | Exclude temp folders from auto-approval |
| No auto-remediation | All actions require manual approval |
๐ฏ Threat & Vulnerability Management (TVM)
๐ Exposure Score & Secure Score
- Exposure Score: 0โ100 (lower = better security posture)
- Microsoft Secure Score for Devices: 0โ100 (higher = better)
- Top security recommendations ranked by risk
- Vulnerability severity: Critical, High, Medium, Low
- CVSS score + exploitability factor
๐ ๏ธ TVM Workflow
Review top recommendations
TVM โ Security recommendations โ Sort by Exposure score impact.
Submit remediation request
Request remediation โ Creates task in Intune or ITSM ticket.
Track remediation
TVM โ Remediation โ Monitor completion status over time.
๐ Advanced Hunting (KQL)
// Find devices with high-severity alerts in last 7 days
AlertInfo
| where TimeGenerated > ago(7d)
| where Severity == "High" or Severity == "Critical"
| join kind=inner AlertEvidence on AlertId
| summarize AlertCount=count(), UniqueDevices=dcount(DeviceName) by Category, Title
| order by AlertCount desc
// Detect LSASS memory dump attempts
DeviceProcessEvents
| where FileName =~ "procdump.exe" or ProcessCommandLine has "lsass"
| where ProcessCommandLine has_any ("dump", "-ma", "minidump")
| project TimeGenerated, DeviceName, InitiatingProcessAccountName, ProcessCommandLine
// Suspicious PowerShell commands (encoded)
DeviceProcessEvents
| where FileName =~ "powershell.exe"
| where ProcessCommandLine has_any ("-EncodedCommand", "-enc", "hidden", "bypass")
| where ProcessCommandLine !contains "Intune" // exclude known Intune scripts
| summarize count() by DeviceName, ProcessCommandLine
| order by count_ desc
// Devices missing critical security updates (TVM)
DeviceTvmSoftwareVulnerabilities
| where VulnerabilitySeverityLevel == "Critical"
| where IsExploitAvailable == true
| summarize CriticalVulns=count() by DeviceName
| order by CriticalVulns desc
| take 50
๐ Reports & Alerts
๐ Alert Queue
- security.microsoft.com โ Incidents & Alerts
- Filter by severity, status, assigned
- Correlation into incidents
- Email notifications configurable
๐ฑ Device Inventory
- All onboarded devices with risk level
- OS version, last seen, onboarding status
- Health status (active/inactive sensor)
- Filter: High risk devices
๐ฏ TVM Dashboard
- Exposure score trend over time
- Top vulnerable devices
- Software with most vulnerabilities
- Zero-day vulnerabilities
๐ง Troubleshooting
โ Common Issues & Fixes
| Issue | Cause | Fix |
|---|---|---|
| Device not appearing in MDE portal | Onboarding policy not applied or sensor not started | Verify EDR policy applied; check SENSE service running |
| Sensor health: No data | SENSE service stopped or network issue | sc start SENSE; check connectivity to MDE endpoints |
| ASR causing app crash | Legitimate app blocked by ASR rule | Add app path as ASR exclusion in Intune |
| Tamper protection blocking changes | Expected โ tamper protection is working | Disable via Intune (not locally) before making changes |
| AIR not triggering automatically | Automation set to manual; device group exclusion | Check device group automation setting in MDE portal |
| macOS MDE not starting | Missing Full Disk Access or system extension not approved | Deploy PPPC and System Extensions profiles via Intune |
๐ป PowerShell & Graph API
# Get MDE onboarding status for all Intune devices
Connect-MgGraph -Scopes "DeviceManagementManagedDevices.Read.All"
Get-MgDeviceManagementManagedDevice |
Select-Object DeviceName, IsEncrypted, ComplianceState,
@{N="MDEStatus"; E={$_.ConfigurationManagerClientEnabledFeatures}} |
Export-Csv "C:\Reports\MDEStatus.csv" -NoTypeInformation
# Get MDE alerts via Defender API
$token = (Get-MgContext).AccessToken
$headers = @{ Authorization = "Bearer $token" }
$alerts = Invoke-RestMethod `
-Uri "https://api.securitycenter.microsoft.com/api/alerts?`$filter=severity eq 'High'" `
-Headers $headers
# Isolate a device via MDE API (incident response)
$deviceId = "device-mde-id"
Invoke-RestMethod `
-Method POST `
-Uri "https://api.securitycenter.microsoft.com/api/machines/$deviceId/isolate" `
-Headers $headers `
-Body (@{ Comment = "Isolating suspected compromised device"; IsolationType = "Full" } | ConvertTo-Json)
# Run antivirus scan on device
Invoke-RestMethod `
-Method POST `
-Uri "https://api.securitycenter.microsoft.com/api/machines/$deviceId/runAntiVirusScan" `
-Headers $headers `
-Body (@{ Comment = "Scheduled AV scan"; ScanType = "Full" } | ConvertTo-Json)
โ Implementation Checklist
๐ Onboarding
- MDE connector enabled in Intune
- Windows onboarding EDR policy created and assigned
- macOS onboarding profiles deployed (system ext, PPPC)
- iOS/Android MDE app deployed via Intune
- All onboarded devices visible in MDE portal within 24h
๐ก๏ธ Protection Policies
- Antivirus policy with cloud protection enabled
- Tamper protection enabled
- ASR rules deployed in Audit mode
- ASR rules reviewed and moved to Block (after 2+ weeks)
- Device control (USB) policy configured
๐ Detection & Response
- EDR in block mode enabled
- AIR automation level configured (Semi-auto minimum)
- Alert notifications configured for SOC team
- Incident response runbook created
- Live Response enabled for incident responders
๐ฏ TVM & Hunting
- TVM dashboard reviewed weekly
- Top 10 vulnerabilities remediation plan created
- Advanced Hunting queries saved for SOC
- Custom detection rules created for org-specific threats