Skip to main content

DingTalk OAuth

Configure DingTalk at the DingTalk Open Platform. Create or open an app and note AppKey and AppSecret (these map to Client ID and Client secret in Casdoor).

CasdoorDingTalk
Client IDAppKey
Client secretAppSecret

DingTalk

Add the Redirect Domain: your Casdoor domain (e.g. https://your-casdoor.com).

DingTalk

Required permission

Enable Contact.User.Read in your DingTalk app (used for /v1.0/contact/users/me). Without it, Casdoor cannot fetch user info and sign-in will fail. Enable it under Permissions Management.

DingTalk

caution

Contact.User.Read must be enabled in the DingTalk application.

Username mapping

Casdoor uses DingTalk’s unionid as the username. This keeps the same user mapped across your DingTalk org even when other details change.

Add the provider in Casdoor

Create an OAuth provider, set Type to DingTalk, and enter AppKey as Client ID and AppSecret as Client secret.

DingTalk

See DingTalk developer docs.