Admin | Sync directory from Google Workspace

Admin | Sync directory from Google Workspace

3 min read
I. Intro
🔖
Availability: This feature is in beta.
Who can perform these steps: Primary administrators or administrators with "Directory Sync" permission.
As an administrator, you can synchronize user data in Google Workspace to the corresponding directory of the organization in Lark.
II. Steps
Create Google Workspace sync task
Prerequisite: Ensure you have the Client ID and Client secret obtained from the Google Cloud console. For more information, see Admin | Obtain Google Cloud authorization credentials.
🔖
Notice: We recommend cleaning up the Lark directory before you start syncing to avoid data conflicts.
  1. Open the Lark Admin Console, go to Settings > Directory Sync, and click Add sync source.
  • 250px|700px|reset
  1. In the pop-up, select Google Workspace.
  1. On the Preparation and Authorization page, fill in the Client ID and Client Secret with the information obtained from Google, and click Authorize Now.
  • 250px|700px|reset
  1. Select the account for configuring Google Workspace and follow the guidance to complete the authorization.
  1. Read and agree to the Data Migration Service Disclaimer and click Next.
  1. On the Sync rule page, select a sync method.
  • Manual sync: Recommended for the first time. You'll need to manually sync the data every time in the future.
  • Scheduled sync: You can set a schedule (weekly, daily, or hourly) for automatic task runs. You'll need to pay attention to the sync status to correct possible errors promptly.
  • 250px|700px|reset
  1. Map the fields. There are three types of mapping fields:
  • Default mapping fields: Enabled by default and can't be disabled, modified, or deleted.
  • Recommended mapping fields: Can be disabled, but not modified or deleted.
  • Custom mapping fields: Click New mapping field at the bottom to add a custom mapping field, which can be modified and deleted.
  1. Save your changes and confirm in the pop-up.
  • Save and Sync: Lark will immediately execute a full data sync. Proceed with caution.
  • Save: For the manual sync method, Lark will not start the sync task. You will need to manually execute the sync task later. For the scheduled sync method, Lark will execute the sync task following the schedule you set.
Google Workspace users will be automatically synced to the directory of Lark.
View sync status
The status of the current sync task is indicated by color-coded card labels.
  • Syncing: The data sync is in progress. You can't edit a task with this status or execute the next sync task.
  • Waiting to be synced: There is no current data sync, and execution of the next sync is pending. This also means that the previous task was successfully executed. For the scheduled sync method, you can also see the time of the next expected sync on the card.
  • Failed to sync: This sync task has completely failed, and no data was synced with Lark. This is generally due to an authorization error, and you need to check whether the Google configuration and the authorized account are correct.
  • Partially Failed: Some members or departments in this task failed to get synced. You can view the sync log to understand the cause of the error and make manual corrections.
Manage sync tasks
Go to Settings > Directory Sync and click the Google Workspace app card to open the sync configuration details page, where you can modify the task configuration, stop the sync, delete the task, and perform other actions.
250px|700px|reset
  • Execute sync immediately: Click Sync Now to manually start a sync task.
  • Stop or restart sync: Click Pause to pause the current sync task (manual sync) or cancel the next sync task (scheduled sync). Click Restart to resume the task.
  • Edit the task: Click Edit Task to modify the settings. The changes will take effect on the next sync.
  • Delete the task: Click the ··· icon > Delete task to delete the app.
Note: You can't restore a deleted app, and all its configurations will be lost, but it doesn't impact the users who have been synced.
View sync logs
Go to Settings > Directory Sync and click Sync log on the Google Workspace app card, then click View Details to the right of a task in the log list to view information about synced members and departments.
250px|700px|reset
III. FAQs
Lark has existing data prior to the directory sync with Google Workspace. How will the data be matched?
  • Member mapping rule: The system will match existing members according to the Work email field. If an email is identical for a member in both Lark and Google Workspace, they will be recognized as the same user. Lark members without a match will be retained.
  • Department matching rule: The system will match existing departments according to the default department name and the department hierarchy. If both the default name of a department and its parent department name are identical on both sides, it will be recognized as the same department. Lark departments without a match will be retained.
We recommend cleaning up the data on the Lark side before formally executing a sync to avoid inconsistencies after syncing.
How can the administrator fix a partial failure for Google Workspace directory sync?
View the reason for the error in the sync log details. Based on the specific reason, go to the Google Cloud console to fix it and then return to Lark to execute a new sync.
For example, the log may show a user sync failure due to a sensitive word found in the member's information, causing Lark's creation of a new user to fail. You can go to the Google Cloud console to edit the member's name and retry.
If the administrator updates the directory synced from Google Workspace in Lark, will the change sync to Google Workspace?
No. The directory is only synced from Google Workspace to Lark.
To avoid data inconsistencies, we don't recommend editing the directory data (such as member names and department names) from Google Workspace in Lark. If you don't update the information on both sides, the next sync from Google Workspace will overwrite your edits in Lark.
Written by: Lark Help Center
Updated on 2025-03-18
How satisfied are you with this content?
Thank you for your feedback!
Need more help? Please contact Support.
0
rangeDom
rangeDom
rangeDom
rangeDom