Is there a way to know in real-time when a device get actually enrolled on an Android Management EMM solution?
In the official documenation it's suggeted an example of license checking that should work by setting a policy to the a new device within 5 minutes of the enrollment, otherwise the API will proceed with a factory reset. But how to know from server side when the device was actually enrolled? The API seems to lack any sort of callback/webhook.
This is the scenario I'm trying to solve:
The only possible solution I can imagine is to periodically call the enterprises.devices.list API to check for new devices, but it seems too inefficient to me.
Am I missing something?
Thanks.
Setup the Pub/Sub notifications, as explained here. You'll then receive a message from the Android Management API when a device enrolls.