Skip to main content

Feishu user sync

Feishu user sync reads the directory available to a custom enterprise app and writes departments, users, and memberships to QwenWork.

Feishu user sync reads the directory available to a custom enterprise app and writes departments, users, and memberships to QwenWork. Check publication and data-access scope before configuration. Feishu appears as Lark in the international User sync page.

Request application read permissions

PermissionCode
Directory basic informationcontact:contact.base:readonly
Department basic informationcontact:department.base:readonly
Department organization informationcontact:department.organize:readonly
User basic informationcontact:user.base:readonly
User department informationcontact:user.department:readonly
User email, when mappedcontact:user.email:readonly
User phone, when mappedcontact:user.phone:readonly
Employment data for employee number or statuscontact:user.employee:readonly
User ID for default identity mappingscontact:user.employee_id:readonly
Prepare the enterprise and app names, App ID, App Secret, granted permissions, published version, all-user directory data access, app availability, and a test user's user_id and profile. If also used for SSO, configure its redirect and sign-in permissions separately. QwenWork reads from the root department. Directory data permission must include all users, with publication effective. App availability and directory data permissions are different settings.

Prepare the Feishu app

  1. Create or open the custom enterprise app in the developer console.
  2. Request the five basic directory, department, user, and membership read permissions listed above.
  3. Add email, phone, and employment permissions for the mapped fields. The user-ID permission is required because member requests always use user_id, even if another ID is selected in the mapping.
  4. Set directory data access to all users and confirm the intended users are in the app's availability scope.
  5. Create and publish a version, then obtain App ID and App Secret securely. Directory writing permissions are not required for this read integration.

Create the source

  1. In Users → User sync, add Lark (the Feishu provider) and start setup.
  2. Enter App ID and App Secret.
  3. Test and continue. A successful new-source test saves the draft; an edited source still needs the final save. Token retrieval does not enumerate the directory or verify permissions and fields.
Admin console: Feishu source credentials.

Check IDs and relationships

Choose supported member sources; the targets remain fixed. Add optional mappings to restore presets after removing a row. Department mappings generally use presets.
Preset sourceUse
user_idExternal user ID; match the Feishu SSO identity
name, email, mobileName, email, phone
employee_no, open_idEmployee number, account
department_idUser's external department ID
Department open_department_id, parent_department_idDepartment and parent identifiers
User department IDs and department-list IDs must use the same type. Feishu exposes several distinct user and department IDs. Email defaults to email. Before assuming a user has no email, check read permissions. Continue after checking required mappings.
Admin console: check source attributes and their QwenWork targets.

Run and verify

  1. Choose all or specified departments and descendants, and the new-user seat option. The Feishu app still needs all-user directory data access.
  2. Start manually; scheduled sync runs daily at the selected Beijing time.
  3. Choose deactivation, deactivation with seat reclamation, or deletion with seat reclamation. Set the alert threshold and email and save.
  4. Enable the source and run sync.
  5. Inspect task details, department hierarchy, user counts, and seats. Check a user belonging to several departments.
  6. Change a test user's department in Feishu and sync again; confirm the existing user was updated without a duplicate account.

Maintain and troubleshoot

  • Missing departments: compare directory data scope, app availability, and QwenWork scope.
  • Wrong hierarchy: compare actual department_id and open_department_id values and include parent departments.
  • Missing fields after publication: check the published permissions and their data scopes.
  • Unexpected leavers: disable the source and inspect permission or profile-field changes before continuing.
Rotate App Secret by editing, retesting, and saving the existing source. Its activation controls directory sync; Feishu sign-in remains a separate SSO configuration.

Connect existing users

Before syncing, make the source external user ID agree with the existing QwenWork user. Sync looks up users by that ID only. Account, email, phone, and employee number are checked for conflicts; an unmatched ID with an occupied identity value fails. A successful update keeps the QID and changes the management source to this source. While it is enabled, the source owns name, email, account, phone, external ID, and employee number. Department and status are locked when mapped. If a deleted user reappears in a pull directory, a new user and QID are created from the current source data and counted as a creation. The external ID points to the new user; old history remains. Roles, passwords, user groups, administrator permissions, seats, and departments are not inherited. Default seats follow the current source policy. See Users / User sync / User sync overview for mapping changes, source switching, and recreation rules. Return to: Users / User sync / User sync overview.