2

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:

  1. The EMM admin generate an enrollement URL and send it to a new employee via email
  2. The new employee read the email after some time and start the enrollment process on their BYOD device
  3. The enrollment proccess completes, but since there isn't any callback, the EMM server can't know a new device was enrolled

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.

Alessandro Prete
  • 420
  • 4
  • 10

1 Answers1

2

Setup the Pub/Sub notifications, as explained here. You'll then receive a message from the Android Management API when a device enrolls.

Florian
  • 235
  • 1
  • 11
  • @Florian can you suggest how to add devices from notification into groups? I mean we have a hierarchy with multiple groups and I would like to add a device into the group from which the user enrolls it. Basically a way to pass ```GroupId``` in the notification. – Sudhu Dec 09 '19 at 09:21
  • @Sudhu provided that you create one `enrollmentToken` per group, I guess you could use the `additionalData` field to embed the `groupId`. – Florian Dec 09 '19 at 10:25
  • 1
    Hi @Florian, thanks a lot for your help, I'm able to get the notification as ```PUSH``` to my API. Is there a way to get the notification only when the ```STATE``` is ```ACTIVE``` ? This would help us in getting IMEI of the device to add it into our DB. – Sudhu Dec 19 '19 at 06:22