Get User List
Permissions
The Identity Management API is authorized at the application level. 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 |
| user_read | Read permissions for user management APIs |
| all | Read and write permissions for all APIs |
| read | Read permissions for all read APIs |
Request Description
Request Headers
| Parameter Name | 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
None
Request Parameters
| Parameter Name | Name | Required | Type | Description |
|---|---|---|---|---|
| org_id | Organization ID | No | String | When empty, all users are queried |
| updated_at_greater | Updated After | No | String | Filters by update time, only returns records updated after this time, format is yyyy-MM-dd HH:mm:ss |
| offset | Page Number | Yes | Int | Starting from page 0 |
| limit | Page Size | Yes | Int | Page size between 10 and 100 |
Response Example
Success Example
HTTP/1.1 200 OK
json
{
"total": 1,
"users": [
{
"user_id": "20220825141325371-4D03-81EF80243",
"org_id": "20210529172248496-D329-5748DE918",
"user_name": "cq04130007",
"name": "cq04130007",
"mobile": "+86-15204130007",
"email": "15204130007@example.com",
"first_name": "F",
"middle_name": "M",
"last_name": "L",
"employee_id": "041300071",
"external_id": "041300071",
"attr_city": "Wuhan",
"attr_nick_name": "cq04130007",
"attr_area": "CN",
"attr_gender": "male",
"attr_work_place": "Wuhan",
"attr_identity_type": "id_card",
"attr_identity_number": "420100199911111111",
"attr_manager_id": "20210601223953060-2AEC-D22770B77",
"attr_birthday": "1993-08-25 00:00:00.000",
"attr_user_type": "20211124152258971-9F54-3B43283CC",
"attr_hire_date": "2022-08-01 00:00:00.000",
"pwd_must_modify": false,
"disabled": false,
"locked": false,
"grade": 1,
"created_at": "2022-08-25 14:13:25.372",
"updated_at": "2022-08-25 14:37:24.610",
"last_login_ip": "120.46.143.105",
"last_login_at": "2024-06-06 15:14:28.000",
"user_org_relation_list": [
{
"org_id": "20220221173529886-B8BB-9F404BCDE",
"relation_type": 0
},
{
"org_id": "20210529172248496-D329-5748DE918",
"relation_type": 1
}
],
"extension": {}
}
]
}Error Example
HTTP/1.1 400 Bad Request
json
{
"error_msg": "Organization does not exist",
"error_code": "ORG.0001"
}Response Parameters
| Parameter Name | Name | Type | Description |
|---|---|---|---|
| total | Total | Int | |
| users | User Collection | List | |
| --user_id | User ID | String | |
| --org_id | Organization ID | String | |
| --user_name | Username | String | |
| --name | Name | String | |
| --mobile | Mobile Number | String | |
| String | |||
| --first_name | First Name | String | |
| --middle_name | Middle Name | String | |
| --last_name | Last Name | String | |
| --employee_id | Employee ID | String | |
| --external_id | External System ID | String | |
| --attr_gender | Gender | String | |
| --attr_birthday | Birthday | String | |
| --attr_nick_name | Nickname | String | |
| --attr_identity_type | Identity Type | String | |
| --attr_identity_number | ID Number | String | |
| --attr_area | Country or Region | String | |
| --attr_city | City | String | |
| --attr_manager_id | Direct Manager | String | Superior user ID |
| --attr_user_type | Person Type | String | Type ID |
| --attr_hire_date | Hire Date | String | |
| --attr_work_place | Work Location | String | |
| --pwd_must_modify | Force Password Change | Boolean | |
| --created_at | User Creation Time | String | |
| --updated_at | User Modification Time | String | |
| --last_login_ip | Last Login IP | String | |
| --last_login_at | Last Login Time | String | |
| --disabled | Disabled | String | |
| --grade | Trust Level | Int | |
| --locked | Locked | Boolean | |
| --extension | Extension Attributes | JSONObject | |
| --user_org_relation_list | User Organization Relationship Collection | List | |
| ----job_id | Relationship ID | String | |
| ----org_id | Organization ID | String | |
| ----relation_type | Relationship Type | int | 1 for belonging, 0 for affiliation |
| --jobs | User Job Collection | List | Returned when the tenant has job management enabled |
| ----job_id | Job ID | String | |
| ----org_id | Organization ID | String | |
| ----position_id | Position ID | String | |
| ----title_id | Job Title ID | String | |
| ----relation_type | Job Type | String | 1 for primary job, 0 for part-time job |
Error Codes
| Status Code | Error Code | Chinese Error Message | English Error Message | Resolution |
|---|---|---|---|---|
| 400 | OAP.PAGE.0003 | 分页页码不符合校验规则 | The pagination page number does not meet the verification rules | Please check whether the page number in the request parameters is correct |
| 400 | OAP.PAGE.0004 | 每页数量不符合校验规则 | The number of pages does not meet the verification rules | Please check whether the page size in the request parameters is correct |
| 400 | OAP.PARAM.0004 | 参数[{0}]不符合校验规则 | Parameter [{0}] does not comply with validation rules | Please check whether the request parameters comply with the validation rules |
| 400 | ORG.0001 | 组织不存在 | Organization does not exist | Please check whether the corresponding organization exists |