Hanzo

WeCom syncer

Sync users from WeCom (企业微信) to Hanzo IAM via the WeCom API.

The WeCom syncer imports users from your WeCom organization into Hanzo IAM. It uses the WeCom API to fetch users from all departments and keeps data in sync.

Configuration

Required fields:

  • Organization: The Hanzo IAM organization where users will be imported
  • Name: A unique name for this syncer
  • Type: Select "WeCom"
  • Corp ID: Your WeCom organization's Corp ID
  • Corp Secret: The secret for your WeCom application

Setup Steps

Step 1: Obtain WeCom Credentials

In your WeCom management platform, navigate to My Company, get Corp ID in Company Information.

wecom_corpid

In your Self-build App, get App secret (Corp Secret).

wecom_app

Optionally, in Sync of Contacts Management Tool, you can get Sync of Contacts secret for advanced configurations.

wecom_contact

Step 2: Configure the Syncer in Hanzo IAM

Go to Syncers tab, select WeCom type and fill in the required information:

  • Enter your WeCom Corp ID in the Corp ID field
  • Enter your application Secret (App secret) in the Corp Secret field

Then save the changes.

wecom_provider

Click Test Connection to verify your credentials before enabling the syncer.

Field Mappings

The syncer automatically maps WeCom user fields to Hanzo IAM user fields:

WeCom FieldHanzo IAM FieldDescription
useridIdUser's unique identifier
nameDisplayNameUser's display name
emailEmailEmail address
mobilePhonePhone number
avatarAvatarProfile picture URL
positionTitleJob title
genderGenderGender (1=Male, 2=Female)
status/enableIsForbiddenAccount status

The syncer automatically handles user account status based on WeCom's status and enable fields:

  • Activated users (status=1, enable=1): Normal Hanzo IAM users
  • Disabled, not activated, or quit users (status=2/4/5 or enable=0): Marked as forbidden in Hanzo IAM

Running the Syncer

After configuration, you can:

  • Enable Is enabled to allow automatic synchronization on schedule
  • Use the Sync button to manually trigger a synchronization
  • The syncer will fetch users from all departments and deduplicate them automatically

How is this guide?

Last updated on

On this page