跳到主内容

钉钉

钉钉 ✔️

配置钉钉

要配置钉钉,请访问钉钉开发者平台并使用您的钉钉账户登录。 一旦你在平台上,按照提供的指示获取你的客户端 ID客户端密钥。 钉钉中的对应术语如下:

术语钉钉名称
Client IDAppKey
Client secretAppSecret

在钉钉中,你可以在应用信息中找到AppkeyAppSecret

钉钉

确保添加重定向域,它应该是你的Casdoor域。

钉钉

更多详细信息,请参考钉钉开发者文档

Required Permissions

You need to enable the following permissions in your DingTalk application:

  • Contact.User.Read - Required for reading user contact information via the /v1.0/contact/users/me API endpoint

钉钉

注意事项

Without the Contact.User.Read permission, authentication will fail when Casdoor tries to fetch user information. Make sure this permission is enabled in your DingTalk application settings under "Permissions Management".

User Identity Mapping

When users authenticate through DingTalk, Casdoor creates their username using the unionid field from DingTalk. This identifier uniquely represents each user across your DingTalk organization, ensuring reliable authentication even when employee details change. Since unionid remains constant throughout a user's lifecycle, it provides stable account mapping between DingTalk and Casdoor.

配置Casdoor

这是钉钉的最终配置:

钉钉