AFW provisioning fails with "Invalid email account" error when existing Google account is present on device
Android
Title: AFW provisioning fails with "Invalid email account" — remove existing Google accountWhen provisioning an Android device using the AFW method, entering afw#esper at the Google account sign-in screen returns an "Invalid email account" error and provisioning cannot continue.
Why this happens
Android's AFW provisioning flow requires the device to have no existing Google accounts present. If a Google account was signed in before setup began — or if a previous factory reset did not fully complete — Android blocks the afw#esper trigger and returns the error. The device must be in a clean, account-free state before provisioning can succeed.
Steps
1. Check whether a pre-existing Google account is the cause
- Power on the device and proceed through the initial setup wizard.
- Watch for an "Accounts added" screen — this confirms a Google account is already associated with the device.
- When the Google account sign-in prompt appears, enter
afw#esper. If the "Invalid email account" error appears, a pre-existing account is blocking provisioning. Continue to the next section.
2. Remove existing Google accounts from the device
If you can access the device's home screen or Settings before the error occurs, remove the accounts manually rather than performing a full factory reset.
- Open Settings → Accounts on the device. The exact path varies by manufacturer — some devices use Settings → Users & Accounts or Settings → Cloud & Accounts.
- Locate every Google account listed.
- Tap each account, select Remove account, and confirm. Repeat until no Google accounts remain.
- Return to the setup wizard and attempt provisioning again by entering
afw#esperat the Google account sign-in screen.
3. Factory reset the device
If accounts cannot be removed manually, or if the device goes directly into setup without allowing access to Settings, a factory reset is required to clear all accounts and return the device to an out-of-box state.
- Open Settings → General Management → Reset on the device. On some devices this path is Settings → System → Reset options.
- Select Factory data reset and confirm. The device will erase all data and reboot into the setup wizard.
- If the device prompts for a Google account password immediately after the reset completes, Factory Reset Protection (FRP) is active. FRP means the previous Google account owner's credentials are required before the device can be used. To resolve this, sign in with the original Google account credentials, or follow your device manufacturer's FRP removal procedure before proceeding.
4. Provision the device using AFW
- Once the device is in the setup wizard with no Google accounts present, proceed through the initial setup screens until the Google account sign-in prompt appears.
- Enter
afw#esperin the email field and tap Next. This triggers the AFW provisioning flow. - Confirm that the device has active internet connectivity at this step — the Esper Agent download requires network access to complete.
- The device will download the Esper Agent and display the Esper provisioning screen. Follow the on-screen prompts to complete enrollment.
If this doesn't resolve it
If provisioning still fails after completing all steps above, collect the following before contacting support:
- Device make, model, and Android version
- A description of the exact step where the failure occurs
- A video recording of the provisioning attempt starting from device power-on, if possible
- Whether the "Accounts added" screen appears after the factory reset
Submit this information when opening a ticket with Esper Support.
Still need help?
If you're still experiencing AFW provisioning failures related to Google accounts, please submit a support ticket and include details about any existing Google accounts on the device and the full error message you're receiving.
Please sign in to leave a comment.
Comments
0 comments