Create and Join User¶
Create a user and assign an OU to the user without logging in to Application Portal.
Operation Permissions¶
In Application Portal, the application must be granted the “Create or delete user accounts in the OU” permission.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.2/user/createAndJoin
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
name |
Mandatory |
String |
The user name |
domain |
Mandatory |
String |
The registered domain name in Application Portal that corresponds to the domain account - Specify a domain to create a domain account - Enter an empty string to create a non-domain account |
Mandatory |
String |
The user’s email address |
|
organizationId |
Mandatory |
String |
The ID of the OU to assign to the user. How to get organizationId>> |
locale |
Optional |
String |
The language code. If unspecified, it is set to Chinese by default
|
nickName |
Optional |
String |
The nickname of the user |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
Boolean |
|
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 “Create or delete user accounts in the OU” permission |
31404 |
Errors such as organization not found, domain not found, and so on |
31408 |
User’s account or email already existed |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/user/createAndJoin
method: POST
requestBody:
{"name":"yourName", "domain":"yourDomain", "email":"yourEmail", "organizationId":"yourOrgId", "locale":"zh_CN","nickName":"yourNickname"}
Return Sample¶
{
"code": 0,
"message": "OK",
"data": true
}