Defender Offboarding using Intune - The EDR way!
Every now and then, I get asked by customers for ways of offboarding devices from Defender for Endpoint for various reasons. Most of the time it involves troubleshooting of some sort which requires going off MDE altogether. While I normally recommend to use put the device in troubleshooting mode, sometimes, it is just not the way to go. And therefore, one finds themselves offboarding the devices.
Until now, I had been using the OMA-URI way of offboarding a device in Intune, but recently I stumbled upon another way which I had no idea it ever existed. Did you know that you can use EDR to offboard a device? Surprise, surprise. I always used EDR under endpoint security in Intune, to use the blob connector to onboard a device. However, the same EDR profile also allows offboarding devices using value from the WindowsDefenderATP offboarding package. Here is how you can go about -
1. Head over to the Microsoft Defender admin portal.
2. Navigate to Settings > Endpoints > Offboarding and grab the downloading package for Windows 10 and 11 using Microsoft Intune as the deployment method.
3. Once downloaded, copy the content of the .offboarding script as shown below -
4. On the Microsoft Intune admin center, navigate to Endpoint security > Endpoint detection and response and click on Create policy.
5. Give a name.
6. Select 'Offboard' against 'Microsoft Defender for Endpoint client configuration package type'.
7. Against 'Offboarding (Device)' setting, paste the value from .offboarding script we grabbed earlier. You will notice that the value is pasted in hidden form. This is by design.
7. Rest of the settings can be left with default values.
8. Assign the policy to a group of devices for offboarding. Note: Make sure to exclude this group from any onboarding policies you may have created in Intune.
End Result
After the device receives the policy, the offboarding will start. This will be evident in the device timeline events in the Defender Portal.
The command, SenseIR.exe OfflineSenseIR 5800 is part of the offboarding package that Microsoft provides when you want to disconnect an endpoint from Microsoft Defender for Endpoint (MDE).
Here’s what it means:
SenseIR.exe > The executable included in the offboarding package (downloaded from the Microsoft 365 Defender portal).
OfflineSenseIR > The command-line argument telling it to run in offline offboarding mode.
5800 > An identifier/version argument used for the specific package.
The device will no longer be onboarded and the status will change both on the device and in Intune.
Final thoughts
The offboarding process is a lot similar to using the custom CSP ./Device/Vendor/MSFT/WindowsAdvancedThreatProtection/Offboarding. However, in my honest opinion, the process has been made a lot simpler using the EDR policy. You only need to extract the value of the .offboarding script and you are good to go.








Comments
Post a Comment