Overview
User Properties
As an authentication platform, Casdoor is able to manage users. Every user has the following properties:
Owner: The organization that owns the userName: The unique usernameCreatedTimeUpdatedTimeId: Unique identifier for each userTypePasswordPasswordSaltPasswordOptions: Password complexity optionsDisplayName: Displayed in the user interfaceFirstNameLastNameAvatar: A link to the user's avatarPermanentAvatarEmailPhoneLocationAddressAffiliationTitleIdCardTypeIdCardHomepageBioTagRegionLanguageGenderBirthdayEducationScoreKarmaRankingIsDefaultAvatarIsOnlineIsAdmin: Indicates whether the user is an admin of their organizationIsGlobalAdmin: Indicates whether the user has permission to manage the CasdoorIsForbiddenIsDeletedSignupApplicationHashPreHashCreatedIpLastSigninTimeLastSigninIpRoles: An array of the user's rolesPermissions: An array of the user's permissions
Unique IDs for social platform logins:
GithubGoogleQQWeChatFacebookDingTalkWeiboGiteeLinkedInWecomLarkGitlabAdfsBaiduCasdoorInfoflowAppleAzureADSlackSteamLdapProperties: A string->string map that stores any additional properties.
Importing Users from XLSX File
You can add new users or update existing Casdoor users by uploading an XLSX file containing user information.
In the Admin Console, go to Users and click the Upload (.xlsx) button.

Select your XLSX file and click Open. The users will be imported.
We provide a template XLSX file named user_test.xlsx in the xlsx folder. The template includes 5 test users and headers for some required user properties.

Bypass password encryption
When migrating users from an external database to Casdoor, there might be situations where you want to bypass or control the default encryption method provided by organization default Password type method.
This can be achieved by using the passwordType field during user import.
Below is an example of a POST body request for the API route /api/add-user.
{
"owner": "organization",
"signupApplication": "first-app",
"email":"[email protected]",
"name": "dev",
"displayName": "developper",
"password": "$2a$10$.o/iVyDE9Xk8ioywHDnQRu72RviOi6FPa1ujhusbSCZeg7VOa6MY6",
"passwordType":"bcrypt",
}
Here, the user's password is already encrypted using the bcrypt algorithm, so we specify the passwordType as "bcrypt" to inform Casdoor not to encrypt it again.