DingTalk as Identity Source
This guide explains how to configure DingTalk as an identity source in IDaaS, synchronizing organizational and user data maintained in DingTalk into the IDaaS platform to ensure data consistency across enterprise application systems.
Prerequisites
- Administrator permissions for the DingTalk Open Platform.
- Administrator permissions for the IDaaS Enterprise Center.
Configuration Flow

Procedure
Create an Application in DingTalk Open Platform
Log in to the DingTalk Open Platform and obtain the
CorpIdon the homepage.
In the top navigation bar of the DingTalk Open Platform, choose App Development > Internal Development. Under Internal Development, create an H5 micro-app or a mini program. This guide uses a mini program as an example. Select DingTalk Apps > Mini Program, click Create App, and fill in the application form.


After creation, enter the mini program, click Development Management on the left, and change the server outbound IP to the IDaaS service outbound IP:
47.92.171.137.
Click Basic Information on the left to obtain the
AppKeyandAppSecret.
Click Security Center on the left, select HTTP Secure Domain, click Add, and configure the secure domain (i.e., the IDaaS tenant domain).

Click Permission Management on the left, switch to the API Permissions tab, and add the API permissions shown in the following figures.




Configure the DingTalk Identity Source in IDaaS
Log in to the IDaaS Enterprise Center, choose Users > Identity Source Management from the top navigation bar, click Add Identity Source, and select DingTalk.

Customize the identity source name, fill in the enterprise ID, AppKey, AppSecret, and other parameters as prompted, then click OK to save.
Enter the detail page of the newly created identity source to view or update the Basic Configuration, including connection parameters, synchronization mechanism, and real-time callback.

Switch to the Advanced Configuration tab. It is recommended to keep the default values or adjust them according to actual requirements.

Parameter Description Select Root Organization The organization node into which identity source data is imported. The default is fine. Organization Matching Policy Mapping relationship for importing DingTalk organizations into IDaaS. The default is fine. Create Organization Create and update organizations are checked Yes by default. Delete Organization By default, organizations are retained (i.e., when an organization is deleted in DingTalk, it is retained in IDaaS). You can also disable or delete organizations. User Matching Policy Mapping relationship for importing DingTalk users into IDaaS. The default is fine. Create User Create and update users are checked Yes by default. Delete User By default, users are disabled (i.e., when a user is deleted in DingTalk, the user is disabled in IDaaS). You can also retain or delete users. Safety Threshold Adjustment Sets the maximum threshold ratio for changes such as deleting users, deleting organizations, or changing organization hierarchy in the upstream identity source.
Threshold = (Difference between platform-recovered data and this recovery / Recovered data) × 100%. If the upstream identity source disables or deletes data exceeding the threshold, the platform will not perform the disable or delete operation.After configuration, switch to the Object Model tab, select Mapping Definition, and configure mapping relationships between DingTalk organization/user attributes and IDaaS organization/user attributes according to project requirements.
The object model supports mapping attributes of users and organizations from the DingTalk identity source to IDaaS user and organization attributes. After configuration, user and organization attributes are recovered from DingTalk into IDaaS.

- Execution Mode: Sets when the attribute needs to be mapped.
- Do Not Map: The attribute will not be synchronized to IDaaS.
- Create: The attribute is synchronized only during creation.
- Update: The attribute is synchronized only during update.
- Create and Update: The attribute is synchronized during both creation and update.
- Transformation Mode: Sets how the attribute is mapped.
- Auto Transform: Synchronize the value as-is from the identity source.
- Script Transform: Use this when the value from the identity source does not meet the required format. Refer to Script Mapping Methods.
- Execution Mode: Sets when the attribute needs to be mapped.
After configuration, click Execute Synchronization to run the synchronization immediately.
TIP
If the synchronization mechanism in the basic configuration is set to scheduled synchronization, there is no need to manually execute the synchronization task here.

After execution, switch to the Synchronization Events page to view all synchronization tasks for this identity source. Click Details under the Operation column to view the import results, or go to the Users > Users and Organizations page to view the imported data.

(Optional) After import synchronization is complete, switch to the Callback Events tab. If callback registration is enabled in Basic Configuration, you can view records of DingTalk address book changes pushed to IDaaS in real time.
