Get Users by User Group¶
Get the user list of a user group.
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.3/userGroup/listAssignedUser
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Required/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Required |
String |
OU ID. How to get orgId >> |
Request Parameters (Body)¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
userGroupId |
Required |
String |
User group ID. You can use the Get Organization User Group List API to get the user group ID. |
pagination |
Required |
Pagination Struct |
Pagination information. Pagination Request Struct >> |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
users |
User Struct |
List of users. user Struct >> |
pagination |
Pagination Struct |
Pagination information. pagination Struct >> |
User Struct¶
Name |
Data Type |
Description |
---|---|---|
userId |
String |
User ID. |
name |
String |
User name. |
String |
The user’s email address. |
|
phone |
String |
Phone number. |
phoneArea |
String |
The area code of phone number. |
Pagination Struct¶
Name |
Data Type |
Description |
---|---|---|
totalElements |
Integer |
Total record number. |
pageNo |
Integer |
Current page number. |
pageSize |
Integer |
Number of records per page. |
Error Codes¶
Error Code |
Description |
---|---|
31400 |
OU ID, pagination, or user group ID is missing, or invalid application; etc. |
31404 |
User, OU, or application does not exist. |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.3/userGroup/listAssignedUser?orgId=your_org_id
method: POST
requestBody:
{
"userGroupId": "your_user_group_id",
"pagination": {
"pageNo": 0,
"pageSize": 100
}
}
Return Sample¶
{
"code": 0,
"message": "OK",
"data": {
"users": [
{
"userId": "your_user_id",
"email": "your_user_email",
"phone": "",
"phoneArea": "",
"name": "your_user_name"
}
],
"pagination": {
"totalElements": 3,
"pageNo": 0,
"pageSize": 1
}
}
}