Employee Identity (EIAM)

Change User Password

API

# Permissions

The Identity Management API is authorized on an application dimension. Before calling the API, you need to set API permissions for different applications. For details, please refer to API Permissions.

Permission Code Description
user_all Read and write permissions for user management APIs
all Read and write permissions for all APIs

# Request Specification

PUT https://{your_domain}/api/v2/tenant/users/{user_id}/change-password

# Request Headers

Parameter Name Chinese Name Required Type Description
Authorization Authorization Yes String Format: Bearer {access_token}
Content-Type Content Type Yes String Fixed value: application/json; charset=utf-8

# Request Example

{
    "password": "P@ssw0rd123",
    "pwd_must_modify": "false"
}
1
2
3
4

# Request Parameters

Parameter Name Chinese Name Required Type Description
user_id User ID Yes String Target user ID
password New Password Yes String
pwd_must_modify Whether password must be changed upon next login No String Defaults to "true"

# Return Example

Correct Example:
HTTP/1.1 200 OK
{
  "user_id": "20201028102749564-9082-DC8CD2722"
}

Error Example:
{
  "error_msg": "用户不存在",
  "error_code": "USER.0001"
}
1
2
3
4
5
6
7
8
9
10
11

# Return Parameters

Parameter Name Chinese Name Type Description
user_id User ID String

# Error Codes

Status Code Error Code Error Message Handling Measures
400 USER.0001 用户不存在 请检查对应用户是否存在
User does not exist
400 PWD.0002 密码长度为{0}~{1}个字符 请检查密码的长度是否符合校验规则
Password length is {0}~{1} characters
400 PWD.0003 密码不能与用户名一致 请检查密码是否与用户名一致
Password cannot match username
400 PWD.0004 密码不允许使用用户名的倒写 请检查密码是否使用了用户名的倒写
Password does not allow reverse writing of username
400 PWD.0005 密码不符合校验规则,{0} 请根据密码策略提升密码的复杂度,或是密码中存在不支持的字符
The password does not meet the verification rules, {0}
400 PWD.0006 该密码为弱密码 该密码为弱密码,请更换为其他密码
The password is weak
400 PWD.0007 不允许使用历史密码 改密码为之前使用过的历史密码,请更换
History passwords are not allowed
400 PWD.0008 密码中最大字符重复数不能超过{0}个 请检查密码中最大字符重复数是否超过{0}个
Maximum number of characters to repeat in password cannot exceed {0}
400 PWD.0009 密码中不允许包含:用户名、手机号、邮箱前缀、姓名拼音 请检查密码中是否包含:用户名、手机号、邮箱前缀、姓名拼音
Passwords are not allowed to include: username, mobile phone number, email prefix, name pinyin

I am ready. Please provide the Markdown content you wish to have translated.