Skip to main content
Level 1.5: Cupcake
March 25, 2024
Solved

Subscribe enterprise to receive usage logs

  • March 25, 2024
  • 4 replies
  • 0 views

Currently, I am trying to implement lost mode notifications with push pubsub and I need to subscribe enterprise to receive usage logs. When I try to use the following json to patch my enterprise (a chunk related to usage logs):

"enabledNotificationTypes": [
"ENROLLMENT",
"STATUS_REPORT",
"USAGE_LOGS",
"COMMAND"
]

I receive only "ENROLLMENT", "STATUS_REPORT" and "COMMAND" in response json. And as expected no location event logs are being pushed from the pubsub. Do I need extra configuration to use USAGE_LOGS or something?

Response example json: 

{
        "name": "enterprises/enterpriseName",
        "enabledNotificationTypes": [
                  "ENROLLMENT",
                  "STATUS_REPORT",
                  "COMMAND"

        ],
       "pubsubTopic": "projects/projectId/topics/topicName",
}

Best answer by jeremy

I've checked our logs, and it seems that even this has not been enabled, I'm seeing some USAGE_LOGS on our incoming notification 

 

 "usageLogEvents": [{
    "eventTime": "2024-03-22T16:49:12.079Z",
    "eventType": "ENROLLMENT_COMPLETE",
    "enrollmentCompleteEvent": {
    }
  }]
}", attributes: {"notificationType"=>"USAGE_LOGS"},

 

So maybe this is enabled "by default" ?

4 replies

Level: 4.1: Jelly bean
March 25, 2024

Hi there

 

I'm seeing the same behaviour when I enable USAGE_LOGS on my enterprise also. @jeremy any insight?

 

This would be worth raising in the partner community (emm.androidenterprise.dev) also for more in-depth assistance 

Level 1.6: Donut
March 25, 2024

Hey @jasonbayton @bonnewu seeing the same thing here also, cannot enable USAGE_LOGS 

Level: 4.1: Jelly bean
March 25, 2024

@Lizzie is this expected? I can't see any docs that would suggest it can't be enabled

jeremyAnswer
Level 1.6: Donut
March 25, 2024

I've checked our logs, and it seems that even this has not been enabled, I'm seeing some USAGE_LOGS on our incoming notification 

 

 "usageLogEvents": [{
    "eventTime": "2024-03-22T16:49:12.079Z",
    "eventType": "ENROLLMENT_COMPLETE",
    "enrollmentCompleteEvent": {
    }
  }]
}", attributes: {"notificationType"=>"USAGE_LOGS"},

 

So maybe this is enabled "by default" ?