Skip to main content

Connect Google Workspace to Directory Sync

To bring the users, groups, and organizational units (OUs) of a Google Workspace directory into OpenLM, connect the directory to Directory Sync. In the Directory Sync UI, this directory type is Google CDS.

Directory Sync connects with a Google service account that OpenLM provides. You authorize that account in your Google Admin console with read-only access, and then add the domain and the sync in Directory Sync.

Before you begin​

Confirm these prerequisites:

  • A super administrator account for your Google Workspace domain. Google requires it for the authorization step.
  • The Directory Synchronization Service (DSS) connected to OpenLM SLM, and at least one approved Directory Synchronization Agent (DSA). See Directory Sync v2x configuration.

Authorize Directory Sync in Google Workspace​

To let Directory Sync read your directory:

  1. Sign in to the Google Admin console as a super administrator.

  2. Select Security, then Access and data control, then API controls, and then select Manage Domain Wide Delegation.

  3. Select Add new.

  4. In Client ID, enter 117731328853281683659.

  5. In OAuth scopes, enter this comma-separated list of scopes:

    https://www.googleapis.com/auth/admin.directory.domain.readonly,https://www.googleapis.com/auth/admin.directory.orgunit.readonly,https://www.googleapis.com/auth/admin.directory.group.readonly,https://www.googleapis.com/auth/admin.directory.group.member.readonly,https://www.googleapis.com/auth/admin.directory.user.readonly
  6. Select Authorize.

The five scopes cover your domains, organizational units, groups, group members, and users. All of them are read-only: Directory Sync can view your directory and can't change it.

For Google's own description of this screen, see Control API access with domain-wide delegation.

Add the Google CDS domain​

To add the directory as a domain:

  1. In the Directory Sync UI, open Domain Manager, and then select Add Domain.

  2. In Directory type, select Google CDS.

  3. Fill in the fields:

    • Domain name: Your Google Workspace domain, for example example.com.
    • Client Id: The client ID that you authorized in the Google Admin console.
    • Username: The email address of the Google Workspace administrator account that Directory Sync connects with.
  4. Select Check domain connectivity, and then select the agent that runs the test. The test takes up to 2 minutes.

  5. Select Save. To go straight to a new sync definition for this domain, select Save Domain & Add Sync instead.

Set up the sync​

To sync the domain, add a sync definition as described in Add a new sync definition. For a Google CDS domain, these settings differ from the ones for an LDAP directory:

SettingWhat to enter for Google CDS
Start Sync FromLeave it empty to sync all OUs, groups, and users. To start from one OU, enter ou=<ou_name>. To start from one group, enter group=<group_name>, for example group=engineering@example.com. You can enter one OU or one group.
Sync object typeUsers. Google CDS domains don't sync computers.
Sync attributeemail.
Membership filterAll objects, Only members of OUs, or Only members of Security Groups.
Search depth0, unless you set an OU or a group in Start Sync From.
Hierarchical group ruleDirectory Sync creates the groups from Security groups and OU. Distribution groups and customized object classes aren't available.

To change which Google attribute fills each OpenLM user property, see Directory attribute mappings in Directory Sync.

The documentation team might draft this page using a large language model. A technical writer reviews every page and verifies it against the product before publishing it. A human makes the final decision.