This is a knowledgebase item. Hope it helps you out someday to offboard a device from Defender for Endpoint via API.

The purpose of the blog post is to inform you how to get an overview of all devices that are listed in Defender for Endpoint. The Defender for Endpoint entries are not automatically removed, resulting in a dirty environment.