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:
| Feature | Description | Edition |
|---|---|---|
| Feishu sign-in | Staff sign in by scanning with Feishu and join departments automatically according to their Feishu departments | Standard |
| Directory sync | Import Feishu departments and members on a schedule or on demand | Enterprise |
| Feishu docs | Detect Feishu links and read their titles, bind groups to a wiki space or folder for automatic sync, unified search | Enterprise |
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
.envis 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.cnandaccounts.feishu.cnon port 443.
Create the Feishu app
-
On the Feishu Open Platform, create a custom app and add the web app capability.
-
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. -
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 -
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:
| Setting | Description |
|---|---|
| Enable Feishu sign-in | Shows the Feishu button on the sign-in page |
| Sign-in button label | Text on the sign-in page button, Feishu by default |
| App ID, App Secret | App credentials. The App Secret is stored encrypted and never shown again; leave it empty to keep the current value |
| Import scope | Whole organisation, or Selected departments and their sub-departments (one Feishu open_department_id per line) |
| Scheduled sync | Every hour, every 6 hours, every day, or manual only. Enterprise feature |
| Merge accounts by email | When someone already has an LDAP or other account with the same email address, Feishu sign-in goes straight into that account |
| Feishu docs | Enterprise 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:
-
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 -
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.
-
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| Setting | Description |
|---|---|
app_id, app_secret | App credentials, required. Reference FEISHU_APP_ID and FEISHU_APP_SECRET in .env |
departments | Empty to sync the whole organisation, or a list of open_department_id values to sync only those departments and their sub-departments |
sync_interval | Scheduled sync interval. 0 or unset means manual sync only. Minimum 10m. Enterprise feature |
docs | true turns on Feishu docs. Enterprise feature |
Single sign-on
Sign in to RST Index with OIDC, CAS 3.0 or SAML 2.0. Addresses to register with the IdP, config.yaml settings, and mapping groups to departments and admins. Enterprise feature.
Upgrade and backup
New-version notices, one-click upgrades and offline upgrade packages in the admin console, upgrade steps and automatic rollback, manual recovery and manual upgrades, and what to back up and how to restore it.