Skip to main content
Level 1.6: Donut
Mar 12, 2025 2:49 PM UTC
Question

Problem Joining Work Profile From Android Device

  • 13 replies
  • 138 views
  • Translate All • Beta, powered by Gemini

I created an enrollment token for an enterprise for work profile, and I ensured that

setAllowPersonalUsage("PERSONAL_USAGE_ALLOWED"); was set for the token. 

 

How ever when I try to join from my android 11(tecno) and android 14(google pixel 7) device with work profile via the ADP app, I get :

Can't add work Profile

A work profile can't be added to this Pixel. If you have questions, contact your IT admin.

 However from my emulator device running Android 15, I could join the enterprise using work profile.

13 replies

jasonbayton
Level: 4.1: Jelly bean
Mar 12, 2025 3:17 PM UTC

Could you pop the full JSON payload here? Obscure the token first 

Translate • Beta, powered by Gemini
Droider in Chief - bayton.org
ElijahAuthor
Level 1.6: Donut
Mar 12, 2025 7:35 PM UTC

You mean this, the enrollment QR code JSON payload:

 

{"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":"BV****BTAAHYOMWOJNZT"}}

 

I am using the AMA Java library

Translate • Beta, powered by Gemini
jasonbayton
Level: 4.1: Jelly bean
Mar 12, 2025 8:51 PM UTC

Ok, it looks fine. 

 

Can you replicate this with a new token, and are you ensuring you aren't just allowing the token to expire? The default expiry time isn't very long. What does your token.create payload look like?

Translate • Beta, powered by Gemini
Droider in Chief - bayton.org
ElijahAuthor
Level 1.6: Donut
Mar 13, 2025 8:41 AM UTC

yes, my token expiry is about 24hrs...

here is the token create payload function:

private static String getQrCodeStringWorkProfile(String enterpriseName, String policyName) throws GeneralSecurityException, IOException { EnrollmentToken token = new EnrollmentToken().setPolicyName(policyName).setDuration("86400s").setAllowPersonalUsage("PERSONAL_USAGE_ALLOWED"); return getAndroidManagementClient() .enterprises() .enrollmentTokens() .create(enterpriseName, token) .execute().getQrCode(); }

 

Translate • Beta, powered by Gemini
jasonbayton
Level: 4.1: Jelly bean
Mar 14, 2025 8:04 AM UTC

That also doesn't show anything obviously wrong. As you're doing a work profile, can you spin up a new token, test on problem devices, and capture a bug report immediately after failure?

Translate • Beta, powered by Gemini
Droider in Chief - bayton.org
Moombas
Level 4.4: KitKat
Mar 14, 2025 7:48 AM UTC

Hi, i guess because of enrollment QR, it's cope, so try to add the relevant PROVISIONING_MODE to the enrollment QR. Example:

"android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE":{"PROVISIONING_MODE":"MANAGED_PROFILE"}

I have in mind, this is required for COPE or even FULLY_MANAGED_DEVICE for a COBO.

Translate • Beta, powered by Gemini
Android Enterprise Expert
jasonbayton
Level: 4.1: Jelly bean
Mar 14, 2025 8:02 AM UTC

Nah that isn't required. 

Translate • Beta, powered by Gemini
Droider in Chief - bayton.org
ElijahAuthor
Level 1.6: Donut
Mar 21, 2025 2:04 PM UTC

I have been able to setup a work profile from my google pixel 7 phone; the reason why it was not setting up was because there were about 4 users on the device, which was the maximum, I had to delete a user and try to setup the work profile again. I also ensured I had enough storage on my device.

However, I can't still setup work profile(BYOD) on the tecno device, I am suspecting it might be due to low memory(the device has 2gb of RAM).

Thanks @jasonbayton, @Moombas for the assistance.

Translate • Beta, powered by Gemini
Moombas
Level 4.4: KitKat
Mar 21, 2025 2:51 PM UTC

Hmm, wonder why 4 users (or even more) on a single device make sense, so from my perspective unexpected but nice that you figured it out at least for 1 device.

 

Ever tried a completely fresh tecno device and add it then (without anything special installed,) so only 1 "private user" and then try adding the work profile?

Low RAM should only cause a device acting slow.

Translate • Beta, powered by Gemini
Android Enterprise Expert
jasonbayton
Level: 4.1: Jelly bean
Mar 21, 2025 8:25 PM UTC

Low-ram devices may opt out of Work profile support.

 

These were two excellent examples to remind me to to ask far more detail about the device. Good edge cases!

Translate • Beta, powered by Gemini
Droider in Chief - bayton.org