All Products
Search
Document Center

Secure Access Service Edge:Secure Lark user access with Secure Access Service Edge

Last Updated:Mar 31, 2026

Connect Secure Access Service Edge (SASE) with Lark so your enterprise users can log on to the SASE client using their Lark accounts. SASE pulls the organizational structure from Lark and keeps it in sync — no separate identity management system required.

After this integration, you can:

  • Let employees log on to SASE with their existing Lark accounts (single sign-on, or SSO)

  • Synchronize your Lark organizational structure and user data to SASE automatically

  • Apply SASE security policies based on Lark departments and user attributes

  • Keep access current when employees resign or change departments

Prerequisites

Before you begin, ensure that you have:

The Feishu Open Platform information in this topic is for reference only. For authoritative guidance, see the official Lark documentation.

Step 1: Create a custom Lark application

Create a custom application on the Feishu Open Platform to get the App ID and App Secret that SASE uses to authenticate users.

  1. Log on to the Feishu Open Platform with your Lark administrator account.

  2. Click Create Custom App.

  3. In the Create Custom App dialog box, enter the Name and Description for the application, then click Create.

  4. In the left navigation pane, click Credentials & Basic Info, then configure the following:

    • In the Credentials section, copy the App ID and App Secret. You will enter these values in the SASE console in Step 3.

    • In the General info section, upload the SASE icon as the application icon: 图标

  5. Configure security settings. Redirect URLs: Add both of the following redirect URLs: IP whitelist: Add an IP address whitelist. The Feishu Open Platform API accepts calls only from IP addresses in the whitelist and rejects all other requests.

    • https://login.aliyuncsas.com/open-dev/feishu

    • https://login.aliyuncsas.com/ui/feishuAuth/

    You can also find these redirect URLs in the SASE console. Go to Identity Authentication > Identity Access, open the Identity synchronization tab, click Create IdP, and set LdP to Lark.
  6. On the Permissions & Scopes page, grant the required permissions to the application. Choose one of the following methods: Option A — Add permissions manually Click Add permission scopes to app, then select the following scopes under Tenant token scopes and User token scopes: Option B — Batch import permissions Click Batch import/export scopes. On the Import tab, paste the following JSON, then click Next, Review New Scopes:

    PermissionDescription
    contact:contactUpdate address book
    contact:contact.base:readonlyRead basic information of address book
    contact:department.base:readonlyRead basic information of departments
    admin:app.info:readonlyRead basic information of applications
    contact:department.hrbp:readonlyQuery department HRBP information
    contact:department.organize:readonlyRead organizational structure of address book departments
    event:ip_listGet egress IPs for events
    contact:user.base:readonlyRead basic information of users
    contact:user.employee_id:readonlyRead user IDs
    contact:user.department:readonlyRead user organizational structure information
    contact:user.email:readonlyRead user email information
    contact:user.phone:readonlyRead user phone numbers
    {
        "scopes": {
            "tenant": [
                "admin:app.info:readonly",
                "contact:department.organize:readonly",
                "contact:department.base:readonly",
                "contact:user.email:readonly",
                "contact:user.phone:readonly",
                "contact:user.employee_id:readonly",
                "contact:user.base:readonly",
                "contact:user.department:readonly",
                "contact:contact.base:readonly"
            ],
            "user": [
                "contact:department.organize:readonly",
                "contact:department.base:readonly",
                "contact:user.email:readonly",
                "contact:user.phone:readonly",
                "contact:user.employee_id:readonly",
                "contact:user.base:readonly",
                "contact:user.department:readonly",
                "contact:contact.base:readonly"
            ]
        }
    }

    To export the permissions you configured, use the Export tab.

  7. On the Events & Callbacks page, configure event subscriptions so SASE stays in sync when your organizational structure changes. Set the Encrypt Key, Verification Token, and Request URL: Enable the following subscription events: Department Created, Department Deleted, Department Info Changed, Employee Resigned, and Employee Info Changed. For more information about configuring event subscriptions in Lark, see Event Subscriptions.

    • Request URL: Get this value from the SASE console. Go to Identity Authentication > Identity Access > IdP Management, click to add an identity source, and set Enterprise IdP to Lark. Copy the displayed request URL.

Step 2: Publish and approve the application

  1. Log on to the Feishu Open Platform with your Lark administrator account.

  2. In the left navigation pane, click Version Management & Release.

  3. Click Create a Version, fill in the App version, Update Notes, Features, Scope changes, and Availability, then click Save. Set both Default Mobile App Feature and Default PC App Feature to Webpage.

    Important

    Users outside the configured availability scope cannot use this identity source to log on to the SASE client.

  4. Approve the application in the Lark Admin console:

    1. Log on to the Lark Admin console with a Lark enterprise administrator account. In the top menu bar, choose Product Features > Admin Console.

    2. Click Enter Lark.

    3. On the Homepage, in the Application Management section, click Go To Review.

    4. On the Application Review page, find the pending application, click Review in the Actions column, then click Approve.

The Lark developer platform configuration takes about 10 minutes to take effect after approval.

Step 3: Connect SASE with Lark

  1. Log on to the Secure Access Service Edge console.

  2. In the left navigation pane, choose Identity Authentication > Identity Access.

  3. On the Identity synchronization tab, click Create IdP.

  4. In the Create IdP panel, select Lark, then click Configure.

  5. In the Basic Configurations wizard, set the parameters described in the following table, then click Connectivity Test.

    If the Connectivity Test fails, verify that the information you entered is correct.
    ParameterDescription
    IdP NameA custom name for this identity source. Must be 2–100 characters and can contain Chinese characters, letters, digits, hyphens (-), and underscores (_).
    DescriptionA description displayed as the logon title in the SASE client to help users identify the identity source.
    IdP StatusEnabled: the identity source is active after creation. Closed: the identity source is disabled after creation. Disabling an identity source prevents end users from accessing internal applications through the SASE app — proceed with caution.
    App IDThe App ID of the custom application you created on the Feishu Open Platform (obtained in Step 1).
    App SecretThe App Secret of the custom application on the Feishu Open Platform (obtained in Step 1).
    Advanced Settings > Event Subscription > Encrypt KeyGet this value from the Address Book Sync page on the Feishu Open Platform.
    Advanced Settings > Event Subscription > Verification TokenGet this value from the Address Book Synchronization page of your application on the Feishu Open Platform.
    Advanced Settings > Event Subscription > Request URLUse this value to configure the redirection URL in the Feishu Open Platform. Subscribed events: Department Created, Department Deleted, Department Info Changed, Employee Resigned, Employee Info Changed.
    Redirect URLStatic value: https://login.aliyuncsas.com/open-dev/feishu. Enter this URL in the Feishu Open Platform under Developer Console > Custom App > Security Settings.
    Automatic SynchronizationWhen enabled, SASE automatically syncs organizational structure from Lark. When disabled, you must manually trigger synchronization. For more information, see Connect an LDAP IdP to SASE.
    Synchronize User InformationWhen enabled, SASE automatically syncs employee information from Lark on the configured cycle. Requires Automatic Synchronization to be enabled.
    Automatic Synchronization CycleThe synchronization interval. Configurable from 1 hour to 24 hours.
  6. After the connectivity test succeeds, click Next.

  7. In the Synchronization Settings wizard, configure the organizational structure scope and field mappings, then click Confirm.

    ParameterDescription
    Organizational Structure SynchronizationSynchronize All: syncs the entire organizational structure from Lark. Partially Synchronize: select specific departments or groups to sync.
    Field Synchronization MappingMap Lark fields to the corresponding SASE fields. To add custom fields, click View Extended Fields in the upper-right corner of the list.

Step 4: Verify the connection

  1. Open the SASE app on a user device.

  2. Enter the enterprise verification ID and click OK. To find the enterprise verification ID, log on to the Secure Access Service Edge console, go to Settings in the left navigation pane, and copy the Enterprise Authentication Identifier.

  3. Enter the Lark account credentials and click Log On, or use Scan QR Code To Log On.

If the log on succeeds, the integration is working correctly.

Troubleshooting

Connectivity test fails in the SASE console

Verify that the information you entered is correct.

Log on fails with an error code

Look up the error code in the Lark Generic error codes reference.

For example, error code 40004 means the application does not have the required department permissions. To resolve this, modify the application's visibility scope in the Feishu Open Platform.

Log on fails with "you do not have application permissions"

Log on with a Lark super administrator account and modify the application's visibility scope to include the affected users.