All Products
Search
Document Center

Identity as a Service:Connect to WeCom

Last Updated:Oct 22, 2026

This topic describes the procedure and common use cases of connecting WeCom to IDaaS EIAM.

Overview

Connecting WeCom to IDaaS requires only four steps:

  1. Create an application: Create applications in both the WeCom admin console and the Alibaba Cloud IDaaS console. Configure basic information and set a trusted domain name and a trusted IP address to meet the security requirements of WeCom.

  2. Grant permissions: Adjust the visible scope of the WeCom application to determine the contacts that IDaaS can access (departments and members only). This scope serves as the source node for subsequent data synchronization.

  3. Select scenarios: Select the feature scenarios that you need, such as contact synchronization, QR code logon, and web authorization logon. Then configure the synchronization rules, such as scheduled full synchronization and field matching logic, and the logon methods.

  4. Field mapping: Bind or map the fields of WeCom members and departments to the fields of IDaaS accounts and organizations to ensure data correlation and consistency.

Preparations

For security purposes, WeCom verifies the trusted domain name and trusted IP address when the contacts and identity verification APIs are called. A trusted IP address can be used for only one enterprise in WeCom. If you use it for multiple enterprises, WeCom identifies you as a service provider, and APIs such as contacts and identity verification become unavailable. To meet the security requirements of WeCom, prepare the following items in advance:

Verification item

Preparation

Trusted domain name

A dedicated domain name whose owner is the same as the authenticated entity in WeCom. (Recommended) Configure it in advance as the custom domain name of your IDaaS EIAM instance. For more information, see Custom domains.

Trusted IP address

Your IDaaS EIAM instance must have at least one available dedicated endpoint. IDaaS EIAM accesses WeCom through your dedicated public egress IP address. For more information, see Network access endpoints|Configure a dedicated public egress IP address.

Use cases

After you connect WeCom, you can use the following capabilities.

Category

Capability

Account

  • Synchronize non-sensitive WeCom contact data to IDaaS EIAM.

  • Synchronize sensitive WeCom contact data, such as mobile phone numbers and email addresses, to IDaaS EIAM.

Logon

  • Use a WeCom QR code to log on to IDaaS EIAM or its applications.

  • Use WeCom web authorization logon, that is, SSO from the WeCom workbench, to log on to IDaaS EIAM or its applications.

Procedure

Step 1: Create an application

  1. Create on the WeCom side.

    1. Create a self-built application in WeCom

      Log on to the WeCom admin console, and in App Management > App, create a self-built application.

    2. Configure application information

      Upload an App Logo, enter an App Name and an App Description (Optional), and select the Visible To scope based on your requirements. The visible scope is the contacts that IDaaS EIAM is authorized to access for data synchronization and logon. Return to the application management page.

    3. View the created application

      Return to the application management page. The application that you created appears in the Self-built section.

  2. Create on the IDaaS side.

    1. Start the WeCom integration process in the IDaaS console

      Log on to the Alibaba Cloud IDaaS console and select your IDaaS instance. In the IdPs menu, click Other IdPs > WeCom to start the integration process.

      Important

      If no dedicated endpoint is available for the current instance, you must add one first. For more information, see Add a dedicated endpoint.

    2. Enter basic information

      Enter the Display Name and the Enterprise ID.

      • Display Name: Users may see this name when they log on to or use IDaaS EIAM.

      • Enterprise ID: Log onto the WeCom admin console. Go to My Enterprise > Enterprise to get the Enterprise ID.

    3. Enter application information

      Enter the application information: AgentId and Secret.

      1. In the WeCom admin console, get the application information from the self-built application on the application details page under Application Management > Applications.

      2. In the Secret section of the application details page, click View.

      3. After you confirm sending in the dialog box, you can view the secret as prompted in the WeCom Team message.

    4. Enter development information

      Note

      The following steps use a self-provided domain name as an example. If you select a custom domain name, go to Branding > Custom Domain Name > Add Custom Domain Name in your IDaaS EIAM instance to complete the custom domain name configuration.

      1. Trusted Domain Name.

        Domain Name Type affects the WeCom capabilities that you can use and how the development information below is generated. The differences between the domain name types are as follows:

        Category

        Self-provided domain name

        Custom domain name

        Feature differences

        Supports only non-sensitive data synchronization and QR code logon.

        In addition to non-sensitive data synchronization and QR code logon, also supports sensitive data synchronization and web authorization logon, that is, SSO from the WeCom workbench.

        Configuration differences

        Prepare a dedicated domain name as the trusted domain name. The owner of this domain name must be the same as the authenticated entity in WeCom. This domain name has no business logic in IDaaS EIAM. The other addresses in the development information are generated by default.

        Select an available Custom domains whose owner must be the same as the authenticated entity in WeCom. This domain name is used by all WeCom features and must remain stable and available. The other addresses in the development information are generated based on the custom domain name that you select.

        1. On the application details page in the WeCom admin console, click Set trusted domain.

        2. Enter the trusted domain name for the OAuth2 web authorization feature of the application.

          Note

          WeCom requires the configured trusted domain name to correspond to the corporate entity. The domain name is independent of the protocol header and URL path.

        3. After the verification passes, follow the WeCom instructions to complete domain ownership verification.

      2. Enterprise Trusted IP. Click the drop-down list and select a dedicated network endpoint.

        1. You must use the dedicated public network access of network endpoints (see Configure a dedicated public egress IP address) so that your IDaaS EIAM instance accesses WeCom by using your IP address.

        2. On the IDaaS EIAM configuration page, select the network endpoint and view the Dedicated Outbound Public IP Address.

        3. You can then see the public IP addresses that the instance can use. Click Copy All IP Addresses.

        4. In your application in the WeCom admin console, configure the copied IP addresses as the Enterprise Trusted IP.

        Important

        All WeCom APIs that IDaaS EIAM uses are called through trusted IP addresses. If the trusted IP addresses are configured incorrectly or are unavailable, all features, such as WeCom data synchronization and QR code logon, are affected. Because the verification logic of WeCom trusted IP addresses is not publicly disclosed, you should also retain other ways to log on to IDaaS, such as an account password or an SMS verification code.

      3. Authorization callback domain.

        1. On the Bind WeCom - Inbound configuration page, copy the authorization callback domain.

        2. In your application in the WeCom admin console, click ConfigurationWeCom Login Authorization.

        3. In the Webpage section, click Set authorization callback domain. Enter the authorization callback domain that you copied from the IDaaS configuration page.

          Note

          If Domain Name Type is set to Custom domain name, you must also set the application homepage URL (web page) on the application details page. This is the address that users are redirected to after SSO from the WeCom workbench.

      After you complete the preceding configurations, click Next to proceed to the Assign Permissions step.

Step 2: Grant permissions

In this step, adjust the Visible To scope as instructed. Visible To is the contact data that IDaaS EIAM is authorized to access for data synchronization and logon. Only departments and members are supported; tags are not included. If you synchronize data, the visible scope serves as the source node for synchronization.

Step 3: Select scenarios

In this step, select the scenario capabilities that you want to use.

Capability description

  • Synchronization target: WeCom contact data is imported under this node in IDaaS.

  • Scheduled verification: Because WeCom does not support querying incremental data, IDaaS automatically performs a full synchronization of all data under the WeCom source node in the early morning every day.

    • You can set a mapping identifier in the field mapping settings to match a field of the IDaaS account, such as the account name, with a field of the WeCom user, such as userid. If a match is found, the accounts are bound and the data is overwritten and updated. Otherwise, an IDaaS account is created.

    • If you need to synchronize data immediately, manually trigger a full synchronization.

    • IDaaS has a built-in synchronization protection capability. When more than 30 accounts or more than 10 organizations need to be deleted, the synchronization task is automatically canceled to prevent data from being deleted by mistake. (Recommended) Adjust the synchronization protection settings based on the size of your enterprise.

  • QR code logon: After you enable this feature, a WeCom QR code logon option is created in the Logon menu and is enabled. Users can scan the QR code to log on directly.

  • Web authorization logon: This feature is enabled by default when the Domain Name Type is set to Custom domain name. After it is enabled, SSO from the WeCom workbench to IDaaS EIAM or its applications is supported, and sensitive data synchronization is supported after authorization.

Note

To get sensitive data, users must manually grant authorization when they open IDaaS EIAM in the WeCom environment. The authorization page appears when SSO is initiated. After authorization, the WeCom mobile phone number and corporate email address are used directly as the mobile phone number and email address of the IDaaS EIAM account. If no corporate email address exists, the personal email address is used instead.

Step 4: Field mapping

Configure field mapping in Step 4 if you have existing data in IDaaS and need to bind WeCom members and departments to IDaaS accounts and organizations. Field mapping is also required if you want to use certain fields of WeCom members as IDaaS account data. For example, you can use the alias of a WeCom member as the display name of the IDaaS account.

Note

If the account ID in WeCom (that is, userid) is automatically generated by the system, it can be modified only once. Because this field is the only primary key that IDaaS can rely on, if it is modified, the associated IDaaS account is deleted and recreated. Modify it with caution.

Important

To protect the data security and privacy of enterprises and employees, the WeCom platform has updated its API policy:

From 20:00 on June 20, 2022, WeCom APIs no longer return the following sensitive fields, except for contact synchronization: avatar, gender, mobile phone number, email address, corporate email address, employee personal QR code, and address. If your application needs this information, use the WeCom OAuth2.0 authorization mechanism to guide administrators and employees to actively grant the relevant permissions, and then get the data.

Manage the WeCom identity provider

After the integration is complete, you are automatically redirected to the IdPs menu. In this menu, you can manage the different features that are linked with the identity provider.

Important notes

Notes on QR code logon

WeCom QR code logon depends on the configuration of the authorization callback domain. Specifically, if your users need to log on to access IDaaS EIAM or an application, these three items must match exactly: the domain name of the IDaaS EIAM logon page in the browser, the authorization callback domain of the WeCom identity provider in IDaaS EIAM, and the authorization callback domain configured in WeCom. Otherwise, WeCom QR code logon is unavailable.

Therefore, if you want users to access IDaaS EIAM through a custom domain name, set it as the default domain name (for details, see Custom domains) and enable the automatic redirect feature. Also set the authorization callback domain in both IDaaS EIAM and WeCom to the custom domain name.

Notes on sensitive data synchronization

To get sensitive data, users must manually grant authorization when they open IDaaS EIAM in the WeCom environment. The authorization page appears when SSO is initiated. After authorization, the WeCom mobile phone number and corporate email address are used directly as the mobile phone number and email address of the IDaaS EIAM account. If no corporate email address exists, the personal email address is used instead.

After a user manually grants authorization, the authorization page does not appear again when the user opens the WeCom application page within 30 days. If a user needs to change the personal sensitive information authorization within 30 days, the user can open the details page of the WeCom application (the application created in WeCom when the identity provider was integrated). On the Personal Sensitive Information Authorization Management page, the user can change the personal sensitive information authorization again.

In addition to manual authorization by users, administrators must also go to My Enterprise > User Base Management > Member Profile Display in WeCom and check whether the display of the required sensitive data, such as mobile phone numbers and email addresses, is enabled. IDaaS EIAM can get only the sensitive user data that users have authorized and that administrators have configured for display.

Retain other logon methods

Important

Alibaba Cloud IDaaS makes best efforts to ensure the availability of your WeCom contact data synchronization and identity verification. However, the verification methods and risk control rules of WeCom, such as trusted domain names and trusted IP addresses, are not publicly disclosed in detail. Alibaba Cloud therefore cannot guarantee continuous and stable logon to IDaaS by using a WeCom account.

To avoid being unable to log on to IDaaS when WeCom is unavailable, you should also retain other logon methods, such as an account password or an SMS verification code. If you do not use other logon methods and cannot log on, you are solely responsible for the resulting losses.

For information about how to configure and use other logon methods, see General settings.