跳到主内容

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).

Casdoor钉钉
Client IDAppKey
Client secretAppSecret

钉钉

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

钉钉

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.

钉钉

注意事项

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.

钉钉

See DingTalk developer docs.