(Google) Configuring a Google Workspace

Configure a Google Workspace to connect Device Management to your Google Workspace tenant and begin syncing ChromeOS devices.

Note: You can configure up to 20 Google Workspaces. Each workspace connects to one Google Workspace tenant and syncs ChromeOS devices.
Note: Android Enterprise device management does not require a Google Workspace. Android Enterprise is a separate, standalone registration. For more information, see View and manage Android Enterprise registration.

Before you begin

Before you configure a Google Workspace in Device Management, ensure you have the following:

  • Access to the Google Cloud Console with a project.

  • Permissions in Google Cloud to enable APIs, create service accounts, and create service account keys.

  • The Organization Policy Administrator and Editor roles in Google Cloud, if your organization blocks service account key creation by default.

  • Access to the Google Workspace Admin Console with the Super Admin or Device Admin role.

  • ChromeOS devices enrolled in your Google Workspace domain.

Set up a Google service account

Set up a service account in Google Cloud and authorize it in Google Workspace so that Device Management can sync devices and manage policies.

Step 1: Enable the required Google Cloud APIs

Enable the APIs that match the device types and features you want to manage:

  • Admin SDK API: Required to sync ChromeOS device inventory from Google Workspace.

  • Chrome Policy API: Required to manage Chrome policies on organizational units (OUs) and groups.

  1. Go to the Google Cloud Console and select your project.
  2. Go to APIs & Services > Library.
  3. Search for each API by name, select it from the search results, and then click Enable.

Step 2: Create a service account

Create a dedicated service account that Device Management uses to access Google Workspace device data.

  1. In the Google Cloud Console, go to IAM & Admin > Service Accounts.
  2. Click Create Service Account.
  3. Enter a service account name (for example, google-device-sync) and a description that identifies the service account as the one that Device Management uses to sync Google devices.
  4. Click Create and Continue.
  5. Skip Grant this service account access to project and click Continue.
  6. Skip Grant users access to this service account and click Done.

Step 3: Create a JSON key for the service account

Generate a JSON key that Device Management uses to authenticate as the service account.

  1. In the service accounts list, click the service account you created.
  2. Click the Keys tab.
  3. Click Add Key > Create new key.
  4. Select JSON and then click Create. The JSON key file downloads automatically.
Important: Store the JSON key file securely. The key provides access to your Google Workspace data and cannot be recovered if lost. Do not commit the key to version control.
Note: If you receive an error that service account key creation is disabled by organization policy, an organization administrator must override the policy for the project before you can create a key. For more information, see Google Cloud documentation: Restricting service account usage.

Step 4: Enable domain-wide delegation in Google Cloud

Domain-wide delegation allows the service account to impersonate users in your Google Workspace domain.

  1. On the service account details page, expand Advanced settings.
  2. In the Domain-wide delegation section, select Enable Google Workspace Domain-wide Delegation.
  3. In Product name for consent screen, enter Tanium Device Management.
  4. Click Save. Google Cloud generates a Client ID for the service account.
  5. Copy the Client ID. You need it in the next step.

Step 5: Authorize the service account in Google Workspace

Authorize the service account to access Google device data in your Google Workspace domain.

  1. Go to the Google Workspace Admin Console and sign in with a Super Admin account.
  2. Go to Security > Access and data control > API Controls.
  3. In the Domain-wide delegation section, click Manage Domain Wide Delegation.
  4. Click Add new.
  5. In the Client ID field, paste the Client ID that you copied in Step 4.
  6. In the OAuth scopes field, enter the scopes for your use case as a comma-separated list.
    For device management only

    CODE
    https://www.googleapis.com/auth/admin.directory.device.chromeos
    For device management and Chrome policy management

    CODE
    https://www.googleapis.com/auth/admin.directory.device.chromeos,
    https://www.googleapis.com/auth/chrome.management.policy,
    https://www.googleapis.com/auth/admin.directory.orgunit.readonly,
    https://www.googleapis.com/auth/admin.directory.group.readonly
    Important: Enter the OAuth scopes exactly as shown. Misspelled or extra characters cause validation errors when you save the workspace.
    Important: Chrome policy management requires all of the scopes in the second list, not just chrome.management.policy. Device Management uses the admin.directory.orgunit.readonly and admin.directory.group.readonly scopes to read the organizational units and groups that you target with Chrome policies.
    Note: These scopes grant both read (inventory) and write (action) permissions.
  7. Click Authorize. The service account appears in the list of authorized API clients.

Step 6: Prepare credentials for Device Management

You now have everything you need to create the Google Workspace in Device Management. When you create the workspace, you provide the following:

  • Service Account JSON: The entire contents of the JSON key file that you downloaded in Step 3.

  • Admin Email: A Google Workspace admin email address that the service account impersonates.

Service Account JSON

When you open the downloaded JSON key file in a text editor, the contents look like the following example:

JSON
{
  "type": "service_account",
  "project_id": "your-project-id",
  "private_key_id": "abc123...",
  "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
  "client_email": "google-device-sync@your-project.iam.gserviceaccount.com",
  "client_id": "106584026335185594283",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/..."
}
Admin Email

The admin email address must meet the following requirements:

  • Be a valid Google Workspace user in your domain.

  • Have the Super Admin or Device Admin role.

  • Have permission to view devices in the Google Workspace Admin Console for the device types that you want to manage.

For example: admin@yourdomain.com or device-admin@yourdomain.com.

Create a Google Workspace

  1. From the Main menu, go to Shared Services > Device Management > Google > Workspaces.
  2. Click Create Google Workspace.
  3. In the Instance Name field, enter a unique name for this workspace.
  4. In the Service Account JSON section, upload the JSON key file that you downloaded earlier from the Google Cloud Console.
  5. Enter the administrator email address in the Admin Email field.
    Important: Device Management validates the service account credentials when you save. If a required OAuth scope is missing from the domain-wide delegation configuration, an error appears. Verify that all required scopes are granted in the Google Workspace Admin Console before saving.
  6. Click Save.

After saving, Device Management begins an initial ChromeOS device sync. The sync interval adjusts automatically based on the number of devices in the workspace.

Note: To apply Chrome policies by group, the groups must exist in your Google Workspace before you can target them in Device Management. Device Management does not create Google groups. Create groups in the Google Workspace Admin Console (Directory > Groups). For more information, see Google Workspace Admin Help: Create a group.

Edit a Google Workspace

  1. From the Main menu, go to Shared Services > Device Management > Google > Workspaces.
  2. Click the name of the workspace you want to edit.
  3. Update the workspace name, service account JSON file, or administrator email address as needed.
  4. Click Save.

Perform a manual sync

Device data syncs automatically on a periodic schedule. To sync immediately, perform a manual sync.

  1. From the Main menu, go to Shared Services > Device Management > Google > Workspaces.
  2. In the row for the workspace you want to sync, click Sync refresh.

Delete a Google Workspace

Important: Deleting a workspace removes all device data synced from that workspace from Device Management. This action cannot be undone.
  1. From the Main menu, go to Shared Services > Device Management > Google > Workspaces.
  2. In the row for the workspace you want to delete, click Delete trash.
  3. Click Confirm.