I have implemented to PUSH a PUB/SUB notification to my POST API with the device details on ENROLLMENT. But notification comes in while the device STATE is still PROVISIONING
Is there a way to get the notification only when the STATE is ACTIVE ? This would help us in getting IMEI of the device only after Enrollment is complete to add it into our DB.
- My Policy contains absolutely nothing, so Policy is compliant.
{
"name": "enterprises/LC023XXXX/policies/Policy_D-a26fead-4c03-b987-b5692e23ab19",
"version": "18"
}
- When I fetch Device Info, it's ACTIVE :
{
"name": "enterprises/LC023XXX/devices/343ee9888eXXXXX",
"managementMode": "PROFILE_OWNER",
"state": "ACTIVE",
"appliedState": "ACTIVE",
"policyCompliant": true
}
- But with ENROLLMENT status,
Pub/Subnever sends withState : ACTIVE:
{
"name": "enterprises/LC021mqgu0/devices/34aeb69ab34355aa",
"managementMode": "PROFILE_OWNER",
"state": "PROVISIONING",
"enrollmentTime": "2020-06-14T10:20:01.713Z",
"lastPolicySyncTime": "2020-06-14T10:20:01.716Z"
}
- Here's how my
Enterpriseis configured :
{
"name": "enterprises/LC02XXXXX",
"enabledNotificationTypes": [
"ENROLLMENT"
],
"pubsubTopic": "projects/projectName/topics/enrollmentNotification"
}
I have tried with multiple Enterprises and none of the enterprises send me the expected STATE - ACTIVE
Any help on what's causing this?