Recently, a few users reported an error when accessing the managed Gmail app within the work profile on an Android Enterprise enrolled device.
I had the same device (Google Pixel 2 running Android 9.0) as one of the affected users, and the only noticeable difference was that devices affected were enrolled as Employee Owned and mine was enrolled as Corporate Owned. After scratching my head a couple of times, I reached out to VMware Workspace ONE support.
Within an Android For Work restriction profile, the setting Allow adding Google accounts, by default, is unchecked for both Work Managed Device and Work Profile.
Per AirWatch, there was a bug (AAGNT-186291) with Intelligent Hub version 19.04 that would still allow users to add a Google account despite having the boxes above unchecked. This loophole has been fixed with Intelligent Hub version 19.05 which was released on 06/06/19.
- AAGNT-186291: Google accounts able to be added even though restriction in place.
While I never added any additional Google accounts to my manged Gmail app, I did encounter the same warning prompt when trying to do so which proved the restriction was in effect.
However, this still did not explain the issue which was resolved by simply restarting the affected devices. This also led me to believe they didn’t have any additional Google accounts within their managed Gmail app.
Solution (Another Possibly)
VMware support suspected the issue was caused by either an outdated Hub app which we couldn’t identify on an employee-owned device based on privacy settings, or the AirWatch console did not receive the correct sample from the affected device when the issue occurred.
Once the device was restarted, the Hub app would send an updated sample to the AirWatch console which subsequently would allow access to the managed Gmail app based on its updated status.