Provisioning stuck on "Waiting for Device Admin": Pre-existing Google account blocks Esper Esper Agent enrollment
Android
If your device is stuck on the "Waiting for Device Admin" screen during provisioning, the issue is likely a pre-existing Google account on the device. Android requires devices to be in a clean state before Esper can enroll them. This article explains how to resolve the problem.
Before you begin
This issue occurs when one or more Google accounts are already signed in on your device before you attempt Esper provisioning. Android's security model prevents the Esper Esper Agent from taking over as Device Owner when active accounts are present. The solution requires you to remove these accounts and factory reset your device.
Step 1: Check for existing Google accounts
Use Android Debug Bridge (ADB) to check whether your device has any Google accounts signed in:
- Connect your device to a computer with ADB installed.
- Run the following command:
adb shell dumpsys account - Look at the output and find the
Accounts:section. - Check the value of
numAccounts:- If
numAccounts = 0, no accounts are present and you can proceed to Step 4. - If
numAccounts >= 1, one or more accounts exist and must be removed before provisioning can succeed. Continue to Step 2.
- If
Step 2: Factory reset your device
You must perform a full factory reset to remove all accounts and prepare the device for enrollment.
Choose one of the following methods:
- Via Settings: Go to Settings → General Management → Reset → Factory Data Reset.
- Via recovery mode: Power off the device and use the hardware key combination specific to your device model. (Consult your device manufacturer's documentation for the exact key combination.)
Step 3: Skip account sign-in during setup
After the factory reset completes, the Android setup wizard will appear. When prompted to sign in to a Google account, skip this step. Do not add any Google accounts until after Esper provisioning is complete.
Step 4: Verify the device is account-free
Run the ADB command again to confirm all accounts have been removed:
adb shell dumpsys account
Verify that numAccounts = 0 before proceeding to provisioning.
Step 5: Re-attempt Esper provisioning
Once you have confirmed the device is account-free, re-attempt Esper provisioning using your preferred method:
- QR code provisioning
- ADB-based provisioning
- Zero-Touch Enrollment (ZTE)
Step 6: Verify successful enrollment
After provisioning completes, confirm that your device has enrolled successfully:
- Log in to the Esper Console.
- Navigate to Devices & Groups → Device Details.
- Verify your device appears in the list with status Online.
If provisioning still fails
If your device remains stuck on "Waiting for Device Admin" even after a factory reset with numAccounts = 0, try the following:
- Verify your provisioning QR code or enrollment token is valid and has not expired.
- Try an alternative provisioning method. For example, if QR code provisioning fails, attempt ADB-based provisioning instead.
- Confirm your device model is on the Esper Supported Devices list. Some devices with heavily customized builds may not support Device Owner provisioning.
- If you have multiple devices experiencing the same issue, consider using Zero-Touch Enrollment for future deployments. This method provisions devices before any Google account sign-in and avoids this problem entirely.
Still need help?
If you have followed all steps above and your device still cannot enroll, contact Esper Support. include the following information in your support ticket:
- Device model and manufacturer
- Output from
adb shell dumpsys accountafter factory reset - The provisioning method you used (QR code, ADB, Zero-Touch, etc.)
- Any error messages displayed on the device
Please sign in to leave a comment.
Comments
0 comments