Skip to main content
Installation

Feishu

Sign in to RST Index with a Feishu custom app, import Feishu departments and members, and turn on Feishu docs. Configured in the admin console and applied on save.

Feishu integration uses a Feishu (feishu.cn) custom app and has three parts:

FeatureDescriptionEdition
Feishu sign-inStaff sign in by scanning with Feishu and join departments automatically according to their Feishu departmentsStandard
Directory syncImport Feishu departments and members on a schedule or on demandEnterprise
Feishu docsDetect Feishu links and read their titles, bind groups to a wiki space or folder for automatic sync, unified searchEnterprise

The recommended place to configure it is System > Sign-in methods > Feishu in the admin console. The page shows the redirect URL and the permission list, can test the connection, and applies changes on save with no restart.

Prerequisites

  • The access URL in .env is already set to the address staff actually use. Feishu calls back to it, and the redirect URL shown on the page is built from it.
  • The portal server can reach open.feishu.cn and accounts.feishu.cn on port 443.

Create the Feishu app

  1. On the Feishu Open Platform, create a custom app and add the web app capability.

  2. Under Security settings > Redirect URL, add the address shown on the sign-in methods page, in the form {base_url}/api/auth/sso/feishu/callback.

  3. Under Permissions, enable the permissions below. Set the directory data scope to all members, or at least the departments you want to import:

    contact:contact.base:readonly
    contact:user.base:readonly
    contact:user.email:readonly
    contact:user.department:readonly
    contact:user.employee:readonly
    contact:department.base:readonly
  4. Create and publish a version. Once your Feishu tenant admin approves it, find the App ID and App Secret under Credentials and basic info.

Configure in the admin console

Under System > Sign-in methods > Feishu, fill in:

SettingDescription
Enable Feishu sign-inShows the Feishu button on the sign-in page
Sign-in button labelText on the sign-in page button, Feishu by default
App ID, App SecretApp credentials. The App Secret is stored encrypted and never shown again; leave it empty to keep the current value
Import scopeWhole organisation, or Selected departments and their sub-departments (one Feishu open_department_id per line)
Scheduled syncEvery hour, every 6 hours, every day, or manual only. Enterprise feature
Merge accounts by emailWhen someone already has an LDAP or other account with the same email address, Feishu sign-in goes straight into that account
Feishu docsEnterprise feature, see below

Choose Test connection to check the credentials, directory permissions and data scope. The test reads one page of data and saves nothing. Feishu sign-in takes effect as soon as you save.

Accounts are bound by Feishu open_id, so sign-in and directory sync must use the same app. Feishu has no login name, so the user name is taken from the work email, then the email, then the employee number.

Department sync

  • A department's external key is its Feishu open_department_id. When staff sign in, they join departments according to their Feishu departments.
  • If department information cannot be read, for example because a permission is missing, sign-in still works but department memberships and synced admin rights are left unchanged.
  • Directory sync (Enterprise) matches departments by open_department_id, creates any that are missing, and syncs department names and hierarchy. Active members get an account created or updated; departed and suspended members are not imported. Accounts imported from Feishu earlier that are no longer in the directory lose the memberships Feishu sync gave them, while the accounts and their personal data are kept.
  • Manual sync and the sync preview are under Organisation and accounts > Feishu sync. See Organisation and accounts.

Feishu docs

Feishu docs is an Enterprise feature. Complete the following on the Feishu Open Platform before turning it on, otherwise Feishu returns an error when staff authorise and Feishu sign-in fails too:

  1. Under Permissions, enable the permissions below for both user identity and app identity:

    offline_access
    drive:drive.metadata:readonly
    drive:drive:readonly
    wiki:wiki:readonly
    search:docs:read
  2. Enable the bot capability and publish a new version. The app's availability must include the owners of the wiki spaces and folders you want to sync.

  3. Binding a group to a wiki space or folder syncs as the app. Add the app's bot to a group chat, then add that group chat as a member of the wiki space (read access is enough), or share the folder with it.

Then turn on Feishu docs under System > Sign-in methods > Feishu. For how staff use it, see Feishu docs.

Configure in config.yaml

Feishu sign-in can also be defined in config.yaml. When it is, the Feishu settings in the admin console become read-only. To manage it from the console again, remove the Feishu source from config.yaml and restart.

- id: feishu
  type: feishu
  name: Feishu
  trust_email: true
  feishu:
    app_id: "${FEISHU_APP_ID}"
    app_secret: "${FEISHU_APP_SECRET}"
    departments: []
    sync_interval: 24h
SettingDescription
app_id, app_secretApp credentials, required. Reference FEISHU_APP_ID and FEISHU_APP_SECRET in .env
departmentsEmpty to sync the whole organisation, or a list of open_department_id values to sync only those departments and their sub-departments
sync_intervalScheduled sync interval. 0 or unset means manual sync only. Minimum 10m. Enterprise feature
docstrue turns on Feishu docs. Enterprise feature

On this page