- Automatic synchronization runs every 30 minutes after the last sync completes.
- Manual synchronization runs when you trigger it.
Enable Directory Sync
You can enable Directory Sync using the Auth0 Dashboard or the Management API.- Auth0 Dashboard
- Management API
Prerequisites
Before you begin, you must have:
- A Google Workspace enterprise connection in Auth0
- Administrator privileges on the Google Workspace organization.
Enable the admin directory API for your enterprise connection
To enable directory sync, the Google access token for your Google Workspace enterprise connection must have the the appropriate scopes to access Google’s APIs.On the Settings tab of an existing Google Workspace enterprise connection (or when creating new connection), in the Identity Provider API section, select Use Admin Directory API and choose:
- Users scopes to add scopes only to access users.
- Users and Groups scopes to add scopes to access both users and groups.
Verify Google administrator consent
From Auth0 Dashboard > Authentication > Enterprise, open your Google Workspace connection. On the Setup tab, either:
- Follow the Continue link if you have admin permissions to configure your Google Workspace settings to use Google’s Admin APIs, or
- Provide the given URL to your administrator so that they can adjust the required settings
Enable Directory Sync
On the Provisioning tab of your connection, toggle Provision Users Using Directory Sync. and choose the your configuration options:
UI for group selection. You can get a list of group IDs using the Google Workspace Directory API.
- In Resources, choose whether to sync Users or Users and Groups.
TODO here
- In Schedule, optionally check Enable Automatic Synchronization to automatically sync every 30 minutes. You can trigger a manual synchronization by selecting Synchronize now.
- In Attribute Mapping, you can customize the mapping of Google attributes to Auth0 user profile attributes.
Monitor Directory Sync activity
You can monitor sync activity in Auth0 tenant logs the under Directory Sync Started and Directory Sync Completed log types (event codesdirectory_sync_started and directory_sync_completed).
Limits
- Synchronizing manually within 30 minutes of the last completed sync returns a 400 error. Wait at least 30 minutes before synchronizing again.