Skip to main content

Google Workspace Directory Sync

Category
SSO
Published

Sync users and groups directly from Google Workspace, with support for role mapping and custom attributes.

Directory Sync now supports Google Workspace. Clerk connects directly to your Workspace directory and syncs users, groups, and group memberships.

Clerk pulls the directory with a Google service account and computes changes, keeping your user base current without waiting for sign-in events.

Set up

Open a Google SAML connection in the Clerk Dashboard and select the Directory sync tab.

Upload a service account key with domain-wide delegation, along with the Workspace admin it should impersonate. Clerk validates the credentials against your directory before enabling Directory Sync.

If you disable it later, Clerk keeps the stored credentials so you can re-enable it with one click.

Works with role mapping and custom attributes

Google groups sync automatically and can be mapped to Clerk Roles.

Custom attribute mapping supports the full pulled directory record, including standard fields such as organizations.title and Workspace custom schemas such as customSchemas.EmployeeInfo.costCenter.

Map array paths to a multi-valued attribute to sync all items.

See the Directory Sync docs for the full setup guide.

Contributors
Gabriel Melo
Nicolas Lopes
Jim Kalafut

Share this article