Open harrisonravazzolo opened 1 month ago
This is a pretty easy fix (just add another check under here I think).
@marko-lisica is going with something like "Can't turn off MDM for Windows hosts." an OK error to return in this case? Or do we need to take this through the product process?
@jahzielv Can't turn off MDM for Windows hosts.
sounds good to me.
Fleet version: 4.58 Web browser and operating system: Chrome
💥 Actual behavior
Attempting to use the api to turn off mdm on Windows device at this endpoint
/api/v1/fleet/hosts/{:id}/mdm
returns a conflict 409 with the message:This api endpoint does not support removing Windows devices, per https://github.com/fleetdm/fleet/blob/d1c3b5b28e45eb02034eb0bebf8db4a58d5e7ca8/server/service/handler.go#L628-L628
The api should return a message similar to the one returned when trying to remove an iOS device (unsupported) through this endpoind:
🧑💻 Steps to reproduce
Try to call the endpoint on a Windows host.