Provisioning fails with "Not allowed to set the device owner because there are already some accounts on the device"
Android
If provisioning fails with the error "Not allowed to set the device owner because there are already some accounts on the device," your device has existing accounts that must be removed before Esper can enroll it. This guide walks you through resolving this issue.
Why this error occurs
Android requires that a device have no existing accounts (such as Google accounts or corporate accounts) before Device Owner privileges can be assigned. Esper needs Device Owner privileges to manage your device, so any pre-existing accounts will block provisioning.
Before you begin
Ensure you have access to the device's Settings app and can perform a factory reset if needed. You'll need to restart provisioning after making changes.
Step 1: Remove all accounts from the device
- On the device, open Settings.
- Navigate to Accounts (the exact path varies by manufacturer; look for "Accounts" or "Users & Accounts").
- Select each account listed — including Google accounts, Samsung accounts, or any other accounts — and tap Remove or Delete.
- Repeat until no accounts remain on the device.
Step 2: Retry provisioning
- Return to the Esper provisioning flow using your original method (QR code, ADB, or manual enrollment).
- Complete provisioning.
If provisioning succeeds, you're done. If the error persists, continue to the next step.
Step 3: Perform a factory reset
- On the device, open Settings.
- Navigate to General Management → Reset → Factory Data Reset (the path varies by manufacturer).
- Confirm the factory reset and wait for the device to reboot and return to the Android Setup Wizard.
- Do not add any accounts during setup. Skip or dismiss any prompts to add a Google account.
- Once the device reaches the home screen, initiate Esper provisioning again.
Verify successful provisioning
After provisioning completes:
- The device appears in the Esper Console under Devices & Groups → Device Details with a status of Active or Provisioned.
- No
set-device-ownererrors appear in provisioning logs.
If the error persists after factory reset
If you still see the error after removing all accounts and performing a factory reset:
-
Check for an existing Device Owner or Work Profile. Run the following ADB command on your computer to see if another device management profile is installed:
If another Device Owner is listed, the device must be factory reset again before Esper can claim ownership.adb shell dpm list-owners -
Collect provisioning logs. Run this ADB command and save the output:
Provide these logs when contacting Esper Support.adb shell logcat -d | grep -i "device.owner\|dpm\|esper"
Recommended approach for multiple devices
If you're enrolling many devices at once, consider using Zero-Touch Enrollment (ZTE) or KME (Knox Mobile Enrollment) if your devices support these methods. These provisioning methods set Device Owner during factory initialization before any accounts are added, avoiding this issue entirely.
Still need help?
Contact Esper Support with the following details if the steps above don't resolve the issue:
- Device model and manufacturer
- Android version
- The provisioning method you're using (QR code, ADB, etc.)
- Full provisioning logs from the ADB command above
Please sign in to leave a comment.
Comments
0 comments