Assign User Groups¶
Assign user groups to users, and multiple user groups can be assigned at once.
Prerequisites¶
The application has been granted the “Authorize users in this OU” permission. Contact the OU administrator to get the permission if necessary.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.2/userGroup/appendUserGroups
Request Parameters (Body)¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
organizationId |
Required |
String |
The OU ID. How to get organizationld >> |
userId |
Required |
String |
The user ID. How to get userId >> |
userGroupIds |
Required |
List |
The ID of the user groups to assign to the user. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
Boolean |
Whether the user group is successfully assigned. |
Error Codes¶
Code |
Description |
---|---|
31400 |
Errors such as incorrect parameters, empty parameters, character limits exceeded, and so on. |
31403 |
The application has not been granted the “Authorize users in this OU” permission. |
31404 |
OU not found. |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/userGroup/appendUserGroups
method: POST
requestBody:
{"organizationId":"yourOrgId", "userId":"yourUserId","userGroupIds": ["ug1","ug2","ug3"]}
Return Sample¶
{
"code": 0,
"message": "OK",
"data": true
}