WorkOS Docs Homepage
Integrations

Google Directory Sync

Learn about syncing your user list with Google Workspace.

This guide outlines how to synchronize your application’s Google Workspace directories.

To synchronize an Enterprise’s users and groups provisioned for your application, you’ll need to provide the Enterprise with:

  • An Endpoint that Google will make requests to.

This is available in your Endpoint’s Settings in the WorkOS Dashboard.

Login to your WorkOS dashboard and browse to “Organizations” on the left hand navigation bar.

Select the organization you’d like to enable a Google Directory Sync Connection with.

From the Organization page, select “Manually Configure Directory.”

A screenshot showing where to find “Manually Configure Connection” for an Organization in the WorkOS Dashboard.

Input your Enterprise’s name and domain, and select “Google Workspace” from the “Directory Type” dropdown.

Then, click “Create Directory”.

A screenshot showing how to create a directory in the WorkOS Dashboard.

Upon creation, your endpoint will have a setup URL of the form: https://accounts.google.com/o/oauth2/v2/auth...

Forward this URL to enterprise customers.

A screenshot showing where to find the setup URL in the WorkOS Dashboard.

Have the Enterprise choose Google as a provider and follow the Google prompts to authenticate with admin credentials.

A screenshot showing the requested permissions in the Google modal.

Changes will appear live in the Directory Sync portal under the “Users” tab:

A screenshot showing users in the "Users" tab of the WorkOS Dashboard.

Why are some events not coming?

Only user events in Google Workspace come in real-time. All other events, such as group events, will poll every 24 hours.

Can you selectively sync users and groups from Google Workspace?

Google Workspace is an all or nothing scenario. You can't selectively sync certain groups. It is recommended to do filtering on your end based on groups assigned to the users if this is needed.