We have have been writing our own EMM solution and successfully created and enrolled device in an enterprise. However, we are unable to un-enroll enterprise by calling this API: https://developers.google.com/android/work/play/emm-api/v1/enterprises/unenroll
The above API throws an exception that reads:
No enterprise was found for the given id. [404]
However, we are able to see the enterprise using this link: play.google.com/work and can un-enroll the enterprise by going into Admin Settings.
Is there any way we can delete the enterprise by calling the above mentioned API.