I'm setting up Android Management API on Android 8.1.0 in fully managed mode, using a QR Code.
I'm following Google code lab link to provision a fully managed device, authenticate with my account then it works.
But when I authenticate with a service account, following sample code to generate a QR code then it doesn't work:
- The policies are not synchronized.
- enterprises.devices.list returns empty list.
But if I use that one to set up work profile mode then it works.
The service account has Owner role in Google Cloud Project.
This is QR code content:
// Authenticate with a Service Account
{
"android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME": "com.google.android.apps.work.clouddpc/.receivers.CloudDeviceAdminReceiver",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM": "I5YvS0O5hXY46mb01BlRjq4oJJGs2kuUcHvVkAPEXlg",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION": "https://play.google.com/managed/downloadManagingApp?identifier=setup",
"android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE": {
"com.google.android.apps.work.clouddpc.EXTRA_ENROLLMENT_TOKEN": "MHBHXZQECHGARCKAKSHF"
}
}
Do I have to configure something else for that Service Account?
I enabled Android Management API in the project.