Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Google Workspace (GSuite) connector

This page describes how to configure the Google Workspace connector for OpenIAM

The Google Workspace connector provisions users to Google Workspace (Google Apps — tools for communication, collaboration, storage, and access management). It authenticates as a Google Cloud service account with domain-wide delegation, using a P12 key, and calls the Admin SDK Directory API.

Operation
Supported

Create / update user (Save)

✅

Delete user

✅

Suspend / resume user

✅

Reset password

✅

Search / synchronize users

✅ (Directory API search filters)

Search / synchronize groups

✅

Group membership

✅ (directory group scope)

Test connection

✅

Group create / delete

❌ reports success and does nothing — manage groups in Google Workspace

Use cases

  • Automating the joiner/mover/leaver lifecycle for Google Workspace accounts from OpenIAM.

  • Role-based provisioning into Google Workspace — users gain/lose their Google account through role membership.

  • Importing Google Workspace users into OpenIAM via synchronization.

Versions and compatibility

The end application is Google Workspace, reached through Google's own Java client libraries rather than by building REST calls. The connector uses two of Google's APIs, which is why the delegation scopes above cover both.

Property
Value

Platform

Google Workspace

Users and groups

Admin SDK Directory API

Drive

Drive API, used to check whether a user owns any Drive files

Authentication

OAuth 2.0 as a service account, with domain-wide delegation and a P12 key

Impersonation

The service account acts as the admin named in the managed system's Login ID

The two Drive scopes are not optional extras. The connector asks Drive whether a user owns any files, so a delegation granting only the two directory scopes leaves that call failing. Grant all four listed under Prerequisites, and enable the Drive API alongside the Admin SDK.

Prerequisites

You need a Google Cloud service account with credentials and domain-wide delegation:

1

Create the service account and its credentials at console.cloud.google.com/iam-admin/serviceaccounts:

  • Select your project and create the service account.

    The Google Cloud service account creation page, with the project selected and the service account name and ID being entered
  • For Project role, specify Owner.

  • Find your service account and select Manage Keys → Add Key → P12. The generated P12 key downloads to your machine — it is the only copy; store it securely.

  • After downloading, note the service account's email address and Unique ID.

    A Google Cloud service account detail page, showing the email address and the Unique ID that becomes the OAuth client ID
  • Enable Google Workspace Domain-wide Delegation under the Details tab.

    The Details tab of a Google Cloud service account, with Google Workspace Domain-wide Delegation enabled
2

Add scopes for the service account. In the Admin Console, go to Security → API Controls → Manage Domain-wide Delegation → Add New. The Client ID is the service account's unique ID (console.cloud.google.com/apis/credentials → OAuth 2.0 Client IDs).

The OAuth 2.0 Client IDs list in Google Cloud credentials, where the service account Unique ID is read off

Add the following comma-separated scopes:

3

Enable the Admin SDK API: console.cloud.google.com/apis/dashboard → Enable APIs and Services → search for Admin SDK → Enable. To use Google Drive, enable the Google Drive API the same way.

Installing the connector

Deploy the connector for your deployment type (the Kubernetes deployment configuration, or the RPM connector service) — see Connectors via RPM. The P12 key file must be present on the host where the connector runs.

Starting, stopping, and restarting

Deployment
Commands

RPM (systemd)

systemctl start|stop|restart openiam-connector@google-connector-rabbitmq

Kubernetes

kubectl rollout restart the connector deployment.

Command-line parameters and properties

The connector is a Spring Boot application. Its defaults ship inside the jar, and you override them in either of two places:

  • An external property file, read at ${confpath}/conf/properties/google-connector-rabbitmq.properties. The file is optional, and confpath is itself a system property, set with -Dconfpath=/data/openiam/.

  • Directly on the command line, as -D arguments, which win over the file.

Property
Default

org.openiam.connector.queue

GOOGLE_Connector_1_Request

org.openiam.connector.name

Google

The connection details themselves are not set here — they are managed system parameters, covered under Configuring the managed system.

Verifying the connector is running

1

In the Webconsole, open the managed system — the dashboard must show the green success status.

2

Click Test Connection — it must return success.

3

In the RabbitMQ management console, confirm the GOOGLE_Connector_1_Request queue exists and has a consumer.

Troubleshooting

Symptom
Likely cause
Resolution

Connection fails

Wrong pkPath, or the P12 key is not on the connector host

Verify the key path exists on the host where the connector runs.

API calls are rejected

Missing scopes or delegation

Re-check the domain-wide delegation scopes and that the Admin SDK API is enabled.

Operations fail with permission errors

The Login ID lacks admin privileges

Use a Google Workspace account with admin rights.

User search returns nothing

Filter syntax

Registering the connector in OpenIAM

If registering manually under Provisioning → Connectors, the queue name must match exactly:

Field
Value

Connector Queue

GOOGLE_Connector_1_Request

The connector replies on GOOGLE_Connector_1_Response. Both are the shipped defaults; override them together, or the connector listens on one queue while OpenIAM publishes to another.

Configuring the managed system

In the Webconsole, go to Provisioning → Managed System. OpenIAM provides a predefined Google Managed System — use it or create a new one.

A configured Google managed system - Active on, the service account address as the Host URL, an admin Login Id, the search filter email colon asterisk, and the pkPath, domain and projectName fields the connector requires
Field
Configuration

Host URL

Your service account name

Login ID

The login ID for the Google Workspace account. The specified login ID must have admin privileges.

Search Filter for User

Google search filter — see the Directory API search reference

pkPath

Path to the private key (P12) for your Google service account (see Prerequisites).

domain

The name of the Google domain.

projectName

The name of the Google project.

If all settings are correct, the Running connectors status column on the Managed System dashboard turns green and names the connector instance that answered. A red status, or No active connectors found, means the connector is not reachable on its queue.

Attribute mapping and policy map

The policy map maps the attributes needed by the Google connector to attribute policies providing each value. The Google Apps connector uses a fixed set of attributes, predefined in the default Google Managed System — typically the correct policy map already exists and needs no update. View it via the Policy Map tab.

The USER policy map for the Google managed system, with eight mappings - password, primaryEmail, familyName, givenName, groupRole, groups, orgUnitPath and suspended - each resolved by a Groovy script under provision/google, the first four enabled and the last four off

Role-based provisioning. Create an access role whose Managed System is the Google managed system, then give the user that role — User Admin → Create New User, or an existing user's Membership tab. Saving the user provisions the account into Google. The role form and the mechanics behind it are the same for every connector; see Configure provisioning and Birthright access for granting the role automatically.

The user's User Identities tab is where to check the result. A provisioned account shows a second identity beside the OpenIAM one:

Principal
Managed System
Active
Provision Status

The OpenIAM login

OPENIAM

yes

SAVED

The Google primary email

Google Managed System

yes

SAVED

Only SAVED on the Google row means the connector completed. If the row is missing entirely, the role did not grant the resource; if it is there with another status, the connector was reached and refused — see Troubleshooting.

Reconciliation and synchronization

To synchronize users from Google: Webconsole → Provisioning → Synchronization, create a sync from Google — for example Google User Sync, with the Google managed system as the source and Principal matched against primaryEmail.

Three shipped scripts go in three separate fields under Attribute Mapping & Rules. There is a set for each Synchronize Object, and all three fields must come from the same set — the dropdowns list both, so a user sync can end up holding a group script:

Field

User sync

Group sync

Source attribute names

GoogleUserSyncAttributes.groovy

GoogleGroupSyncAttributes.groovy

Validation Rule

GoogleUserSampleValidationScript.groovy

GoogleGroupSampleValidationScript.groovy

Transformation Rule

GoogleUserSampleTransformationScript.groovy

GoogleGroupSampleTransformationScript.groovy

The user set lives under sync/user/google and keys on primaryEmail; the group set lives under sync/group/google and keys on the group's name, carrying description and email with it. Leave Preprocessor Script and Postprocessor Script empty in both.

An example synchronization configuration for Google users - Active on, the Google managed system as the source, Principal matched against primaryEmail, and the attribute-lookup, validation and transformation scripts all under sync/user/google

Sync Now synchronizes users from Google to OpenIAM based on the provided SQL Query / Directory Filter — see the Directory API search reference.

Last updated

Was this helpful?