Unfortunately, i did not find an API to unenroll a device. Deleting a device (possible with API) emoves the device from sophos, but does not remove the management profile from the device, so it is useless without unenrolling before...
This thread was automatically locked due to age.