Get Organization User List¶
Authorize an application to get a list of all the users under a specified organization (OU) without logging in to the Application Portal.
Prerequisite¶
The associated application must have access permissions (authorized by the organization administrator) to get the user information.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.2/user/organization/roster
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
orgId |
Mandatory |
String |
The organization ID which the asset belongs to. How to get orgId >> |
pagination |
Mandatory |
Pagination Request Struct |
Lists the paging requirements in a request. If not specified, the default pagination size is 1000 pages, starting from 0. For more details, see Pagination Request Struct |
startUpdatedTime |
Optional |
String |
The start time of the update time of the user information. Time parameter format >> |
endUpdatedTime |
Optional |
String |
The end time of the update time of the user information. Time parameter format >> |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
Data Struct |
The pagination and list of the users’ information |
Data Struct¶
Name |
Data Type |
Description |
---|---|---|
pagination |
Pagination Struct |
The pagination information |
users |
Array of Users Struct |
The list of the users’ information |
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. |
|
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. |
createdTime |
String |
The time when the user is created. |
joinTime |
String |
The time when the user is added to the OU. |
department |
String |
The department of the user. |
company |
String |
The company of the user. |
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 |
Organization ID and pagination value are required |
31403 |
The application is not authorized to access user information |
31404 |
Can not find this organization |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/user/organization/roster
method: POST
requestBody:
{
"orgId": "yourOrgId",
"pagination": {
"pageNo": 0,
"pageSize": 1000,
"sorters": []
}
}
Return Sample¶
{
"code": 0,
"message": "OK",
"data": {
"users": [
{
"userId": "your_user_id",
"email": "your_user_email",
"phone": "your_user_phone",
"phoneArea": "+86",
"name": "your_user_name",
"domain": "",
"createdTime": "2019-10-21 01:56:26.0",
"joinTime": "2020-03-20 09:56:37.0",
"department": "your_user_department",
"company": "your_user_company",
"position": "your_user_position",
"nickName": "your_user_nickname"
}
],
"pagination": {
"totalElements": 1,
"pageNo": 0,
"pageSize": 1000
}
}
}