Category filter
Google Workspace Enrollment for iOS Devices
Seamlessly assign iOS devices to corporate identities by integrating Hexnode UEM with Google Workspace (formerly G Suite). This guide outlines the configuration process using Google Service Accounts to synchronize users and enforce authenticated enrollment for iOS fleets, ensuring a secure and streamlined onboarding experience.
Prerequisites
Before starting the integration, ensure you have the following:
- Google Workspace Account: An active account with administrator privileges.
- Hexnode UEM Portal: Access to the admin console.
- Google Cloud Console Access: Ability to create projects and service accounts.
Step-by-Step Configuration Guide
Phase 1: Configure Google Workspace
This phase involves creating a service account in Google Cloud and granting it the necessary permissions to communicate with Hexnode.
Step 1.1: Create a Service Account
- Log in to the Google Cloud Console using your Google Workspace admin credentials.
- Click on the project dropdown (top left) and select New Project.
- Project Name: Enter a recognizable name (e.g., Hexnode-MDM-Integration).
- Click Create.
- Navigate to APIs & Services > Credentials from the left sidebar.
- Click + CREATE CREDENTIALS and select Service account.
- Fill in the details:
- Service account name: e.g., hexnode-service-account.
- Service account ID: Auto-generated.
- Description: “Service account for Hexnode UEM integration.”
- Click Create and Continue.
- (Optional) Grant access to the project: Select Service Accounts > Service Account Admin. Click Continue and then Done.
- Click on the newly created service account email address to edit it.
- Go to the Keys tab.
- Click Add Key > Create new key.
- Select JSON as the key type and click Create.
Step 1.2: Enable Admin SDK API
- In the Google Cloud Console, go to APIs & Services > Enabled APIs & services.
- Click + ENABLE APIS AND SERVICES.
- Search for “Admin SDK API”.
- Select it and click Enable.
Step 1.3: Manage API Client Access (Domain-Wide Delegation)
- Log in to the Google Admin Console.
- Navigate to Security > Access and data control > API controls.
- Under Domain Wide Delegation, click Manage Domain Wide Delegation.
- Click Add new.
- Client ID: Open the JSON file downloaded in Step 1.1 and copy the client_id value. Paste it here.
- OAuth Scopes: Copy and paste the following scopes (comma-separated) into the field.
- Click Authorize.
| Scope URL | Description | Status |
|---|---|---|
| https://www.googleapis.com/auth/admin.directory.user | Allows Hexnode to sync individual users. | Mandatory |
| https://www.googleapis.com/auth/admin.directory.group | Allows Hexnode to sync user groups. | Mandatory |
| https://www.googleapis.com/auth/admin.directory.domain | Allow Hexnode to fetch domain information. | Mandatory |
Phase 2: Integrate with Hexnode UEM Server
Connect your Hexnode portal to the configured Google Workspace account.
- Log in to your Hexnode UEM portal.
- Navigate to Admin > Google Workspace.
- Enter the Google Workspace Admin Email (the email address of the Super Admin used to create the service account).
- Google Workspace Key: Upload the JSON file downloaded in Phase 1.
- EMM Token: In the Google Admin Console, go to Security > Manage EMM provider for Android. Generate the Token and paste it into the Hexnode portal.
- Click Next.
- Configure the synchronization settings:
- Click Save.
| Setting | Description |
|---|---|
| Sync across all domains | If checked, users/groups from all domains are synced. |
| Choose Domain(s) | Allows manual selection of specific domains to sync. |
| Scheduled Scan | Set a frequency (Daily/Weekly) for auto-sync. |
Phase 3: Enroll iOS Devices
Once integrated, you can enroll devices using Google Workspace authentication.
- Navigate to Enroll > Platform-Specific > iOS > Email/SMS.
- Switch the authentication mode to Authenticated Enrollment.
- Enrollment Category:
- Enrollment Request: Select Google User. Hexnode will send an automated email or SMS containing the server address and detailed enrollment instructions.
- Self Enrollment: Select Google User. No automated request is sent; users proceed using their dedicated credentials.
- Modify the device Ownership (Corporate or Personal) if required.
- Click Next.
If you opted for Enrollment Request, complete these additional steps:
- Select the delivery medium: Email or SMS.
- Change the Domain setting from Local to your specific Google Workspace domain.
- Select the target users from the list and click Save.
Phase 4: On-Device Enrollment Process (User Actions)
- Access Portal: Open Safari and go to https://portalname.hexnodemdm.com/enroll/.
- Agreement: Enable the checkbox for Terms and Conditions and click Enroll.
- Authentication: Click Authenticate with Google and enter Google Workspace credentials.
- Profile Download: Allow the configuration profile to download.
- Installation:
- iOS 15+: Settings > General > VPN & Device Management.
- Below iOS 15: Settings > General > Profile.
- Trust: Click Install, then click Trust for Remote Management.
- Hexnode App: Once “Done” is clicked, the Hexnode UEM app will install. Open it and Allow permissions for Location and Notifications.
Troubleshooting
- Error: “Invalid Input” during Workspace Configuration
Possible Cause: This could happen if any of the steps went wrong while configuring Google Workspace.
Solution: Go through the steps and ensure that the below-mentioned ones are carried out properly.
- JSON Key Verification: The JSON file must be downloaded from the corresponding Service account in the Google Developers Console.
- Role Configuration: Ensure that Service Account Admin is chosen as the Service Account role.
- Domain-Wide Delegation: The Enable Google Workspace Domain-wide Delegation option under the created Service Account must be checked.
- API Activation: Ensure that APIs and services (such as the Admin SDK) are enabled.
- Client Authorization: In the Google Admin Console, ensure that API clients are correctly authorized to facilitate the syncing of users and user groups.
While integrating with the Hexnode console:
- Ensure that the Google Workspace account’s Admin email is provided.
- A proper Domain name is provided.
- The correct JSON file is uploaded.
- The correct Token is provided.
- Once these details are provided, the integration will be completed automatically.
- Error: “Failed Sync” shown after configuration
Possible Causes: User and/or group scope was not provided during the initial setup.
Solution: Ensure User and group scopes are added before configuring Google Workspace. If the scope to sync groups is not provided, the table displays “Sync failed” after configuration. This sync failure does not necessarily mean users are not synced, but indicates that groups could not be successfully synchronized.
- Error: “Google Workspace could not be configured, ensure that necessary OAuth scopes are provided”
Possible Causes:
- Any of the OAuth scopes are missing while configuring Google Workspace.
- Admin SDK is not enabled.
Solution: Ensure the necessary scopes are added correctly under the SHOW DOMAIN-WIDE DELEGATION dropdown menu in the Google Admin account:
- https://www.googleapis.com/auth/admin.directory.user
- https://www.googleapis.com/auth/admin.directory.group
- https://www.googleapis.com/auth/admin.directory.domain
If the issue persists after adding the correct OAuth scopes, verify if the Admin SDK is enabled for the corresponding account:
- Sign in to the Google Admin Account.
- Navigate to Security > API reference.
- Check the Enable API access option.
- Press Save.
Frequently Asked Questions (FAQs)
- Why does the error “Google Workspace domain names could not be retrieved” appear?
This typically happens if the Domain Scope (https://www.googleapis.com/auth/admin.directory.domain) is missing from the API Client Access settings in the Google Admin Console. Ensure all three scopes listed in Table 1 are added correctly.
- Can multiple domains be synced?
Yes. In the Hexnode integration settings, the “Sync across all domains” option can be selected to automatically include sub-domains or secondary domains associated with the Google Workspace account.
- Is the JSON key file important?
Yes, the JSON key file contains the private key credentials for the service account. If lost, you cannot recover it; you must generate a new key in the Google Cloud Console and re-upload it to Hexnode.
- Does this method support Two-Factor Authentication (2FA)?
Yes, since the user authenticates directly through Google’s login page during enrollment, any 2FA policies enforced by Google Workspace will be active.