Configure Gmail accounts automatically using google workspace instead of Api attributesSolved

Participant
Discussion
5 months ago Jan 08, 2026

Is it possible to pass device or user attributes through the Hexnode API, such as the email address and password for Gmail, so that the email app gets configured automatically on managed devices? 

The goal is to avoid manually entering each user’s email settings on the device. Our users are managed in Google Workspace, but there is some confusion about whether local users or custom API attributes should be used to push these credentials. Do I need to build a custom script for this? 

Replies (1)

Marked SolutionPending Review
Hexnode Expert
5 months ago Jan 08, 2026
Marked SolutionPending Review

Hi @ezekiel,

While a custom API-based workflow can technically be built, it is not recommended for this scenario. Passing passwords via API requires securely storing, transmitting, and constantly updating sensitive credentials whenever a user changes their password. 

For Google Workspace-managed users, the best practice is to use Hexnode’s native Google Workspace integration combined with OAuth. This means you do not need to send or store the password in the MDM at all. 

Here is the recommended workflow: 

  1. Integrate Google Workspace with Hexnode from your portal and allow it to sync your users. 
  2. Create an email configuration policy in Hexnode UEM. 
  3. Use the dynamic variable %email% in the email address field. 
  4. Enable OAuth / Google Sign-In for authentication. 
  5. Assign the policy to the required devices or device groups. 

With this setup, Hexnode automatically pre-fills the assigned user’s Google Workspace email address on the device. The user is then redirected to the official Google authentication flow to enter their password directly. If their password ever changes in the future, no updates are required from the MDM side! 

Please let me know if you need any help getting the workspace integration configured. 

Best regards, 
Eden Pierce 
Hexnode UEM 

Save