Get Organization User List¶
Authorize an application to get a list of all the users under a specified OU.
Prerequisites¶
The application has been granted the “Obtain the ID, username, email, and phone number of all users in the OU” permission. Contact the OU administrator to get the permission if necessary.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.2/user/organization/roster
Request Parameters (Body)¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
orgId |
Required |
String |
The OU ID which the asset belongs to. How to get orgId >> |
pagination |
Required |
Pagination Request Struct |
Lists the paging requirements in a request. Pagination Request Struct >> |
userIds |
Optional |
List |
The user list to be queried. If not provided, all users will be returned. |
startUpdatedTime |
Optional |
String |
The start time of the update time of the user information, in the format of millisecond timestamp. For example: 1750302616000. Time parameter format >> |
endUpdatedTime |
Optional |
String |
The end time of the update time of the user information, in the format of millisecond timestamp. For example: 1750302616000. Time parameter format >> |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
pagination |
Pagination Struct |
The pagination information. Pagination Struct >> |
users |
Users Struct |
The list of the users’ information. Users Struct >> |
Pagination Struct¶
Name |
Data Type |
Description |
---|---|---|
pageNo |
Integer |
The request pages. |
pageSize |
Integer |
The number of records in each page. |
totalElements |
Long |
The total number of records. |
Users Struct¶
Name |
Data Type |
Description |
---|---|---|
userId |
String |
The user ID. |
String |
The user’s registered email address. |
|
phone |
String |
The user’s registered phone number. |
phoneArea |
String |
The area code of the user’s registered phone number. |
name |
String |
The user name. |
domain |
String |
The domain the user belongs to. Returned only if the user account is a domain account. |
createdTime |
String |
The time when the user is created. |
joinTime |
String |
The time when the user is added to the OU. |
company |
String |
The company that the user works for. |
department |
String |
The department that the user belongs to. |
position |
String |
The position of the user. |
nickName |
String |
The nickname of the user. |
updatedTime |
String |
The update time of the user information. |
Error Codes¶
Code |
Description |
---|---|
31400 |
OU ID and pagination value are required |
31403 |
The application is not authorized to access user information |
31404 |
Can not find this OU |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/user/organization/roster
method: POST
requestBody:
{
"orgId": "your_org_id",
"pagination": {
"pageNo": 0,
"pageSize": 1000,
"sorters": []
},
"userIds": [
"your_user_id"
]
}
Return Sample¶
{
"code": 0,
"message": "OK",
"data": {
"users": [
{
"userId": "yourUserId",
"email": "yourEmail@enos.com",
"phone": "",
"phoneArea": "",
"name": "yourUserName",
"domain": "",
"createdTime": "2024-09-25 02:15:03",
"joinTime": "2024-09-25 07:12:33",
"department": "",
"company": "",
"position": "",
"nickName": "",
"updatedTime": "2024-09-25 02:15:03",
"accountStartTime": "",
"accountExpireTime": ""
},
{
"userId": "yourUserId",
"email": "yourEmail@enos.com",
"phone": "",
"phoneArea": "",
"name": "yourUserName",
"domain": "",
"createdTime": "2024-09-11 17:43:01",
"joinTime": "2024-09-25 07:12:33",
"department": "",
"company": "",
"position": "",
"nickName": "",
"updatedTime": "2024-09-11 17:43:01",
"accountStartTime": "",
"accountExpireTime": ""
}
],
"pagination": {
"totalElements": 14,
"pageNo": 0,
"pageSize": 2
}
}
}