Creating a User
Function
This API is used to synchronize a user to IAM Identity Center using the System for Cross-domain Identity Management (SCIM) protocol.
URI
POST /{tenant_id}/scim/v2/Users
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
tenant_id |
Yes |
String |
Globally unique ID of a tenant |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Authorization |
Yes |
String |
Bearer token |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
externalId |
No |
String |
External ID |
userName |
No |
String |
Username, which uniquely identifies a user |
No |
Object |
Name of a user |
|
displayName |
No |
String |
Display name of a user |
nickName |
No |
String |
Nickname of a user |
profileUrl |
No |
String |
URL associated with a user |
No |
Array of objects |
Email addresses of a user |
|
No |
Array of objects |
Addresses of a user |
|
No |
Array of objects |
Phone numbers of a user |
|
userType |
No |
String |
User type |
title |
No |
String |
User title |
preferredLanguage |
No |
String |
User's preferred language |
locale |
No |
String |
Geographical area or location of a user |
timezone |
No |
String |
Time zone of a user |
active |
No |
Boolean |
Whether a user is enabled |
schemas |
No |
Array of strings |
Summary |
No |
Object |
Object that contains the user's work-related information |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
formatted |
No |
String |
Formatted name to be displayed |
familyName |
No |
String |
Family name of a user |
givenName |
No |
String |
Given name of a user |
middleName |
No |
String |
Middle name of a user |
honorificPrefix |
No |
String |
Prefix of a user name |
honorificSuffix |
No |
String |
Suffix of a user name |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
value |
Yes |
String |
Email address |
type |
No |
String |
Email address type |
primary |
Yes |
Boolean |
Whether the value is the user's primary email address |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
formatted |
No |
String |
Formatted address to be displayed |
streetAddress |
No |
String |
Street |
locality |
No |
String |
Location |
region |
No |
String |
Region |
postalCode |
No |
String |
Postal code |
country |
No |
String |
Country or region |
type |
No |
String |
Address type |
primary |
No |
Boolean |
Whether the address is the user's primary address |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
value |
No |
String |
Phone number |
type |
No |
String |
Phone number type |
primary |
No |
Boolean |
Whether the value is the user's primary phone number |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
costCenter |
No |
String |
Cost center Minimum length: 1 Maximum length: 1024 |
department |
No |
String |
Department Minimum length: 1 Maximum length: 1024 |
division |
No |
String |
Division Minimum length: 1 Maximum length: 1024 |
employeeNumber |
No |
String |
Employee ID Minimum length: 1 Maximum length: 1024 |
No |
Object |
Manager |
|
organization |
No |
String |
Organization Minimum length: 1 Maximum length: 1024 |
Response Parameters
Status code: 201
Parameter |
Type |
Description |
---|---|---|
id |
String |
Globally unique ID of a user |
externalId |
String |
External ID |
Object |
Metadata |
|
schemas |
Array of strings |
Summary |
userName |
String |
Username, which uniquely identifies a user |
Object |
Name of a user |
|
displayName |
String |
Display name of a user |
nickName |
String |
Nickname of a user |
title |
String |
User title |
userType |
String |
User type |
preferredLanguage |
String |
User's preferred language |
locale |
String |
Geographical area or location of a user |
timezone |
String |
Time zone of a user |
active |
Boolean |
Whether a user is enabled |
Array of objects |
Email addresses of a user |
|
Array of objects |
Addresses of a user |
|
Array of objects |
Phone numbers of a user |
|
Object |
Object that contains the user's work-related information |
Parameter |
Type |
Description |
---|---|---|
resourceType |
String |
Resource type |
created |
String |
Resource creation time |
lastModified |
String |
Last resource update time |
Parameter |
Type |
Description |
---|---|---|
formatted |
String |
Formatted name to be displayed |
familyName |
String |
Family name of a user |
givenName |
String |
Given name of a user |
middleName |
String |
Middle name of a user |
honorificPrefix |
String |
Prefix of a user name |
honorificSuffix |
String |
Suffix of a user name |
Parameter |
Type |
Description |
---|---|---|
value |
String |
Email address |
type |
String |
Email address type |
primary |
Boolean |
Whether the value is the user's primary email address |
Parameter |
Type |
Description |
---|---|---|
formatted |
String |
Formatted address to be displayed |
streetAddress |
String |
Street |
locality |
String |
Location |
region |
String |
Region |
postalCode |
String |
Postal code |
country |
String |
Country or region |
type |
String |
Address type |
primary |
Boolean |
Whether the address is the user's primary address |
Parameter |
Type |
Description |
---|---|---|
value |
String |
Phone number |
type |
String |
Phone number type |
primary |
Boolean |
Whether the value is the user's primary phone number |
Parameter |
Type |
Description |
---|---|---|
costCenter |
String |
Cost center Minimum length: 1 Maximum length: 1024 |
department |
String |
Department Minimum length: 1 Maximum length: 1024 |
division |
String |
Division Minimum length: 1 Maximum length: 1024 |
employeeNumber |
String |
Employee ID Minimum length: 1 Maximum length: 1024 |
Object |
Manager |
|
organization |
String |
Organization Minimum length: 1 Maximum length: 1024 |
Parameter |
Type |
Description |
---|---|---|
value |
String |
Manager Minimum length: 1 Maximum length: 1024 |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
schema |
String |
Summary |
schemas |
Array of strings |
Summary list |
detail |
String |
Exception details |
status |
Integer |
Status code |
timeStamp |
String |
Timestamp |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
schema |
String |
Summary |
schemas |
Array of strings |
Summary list |
detail |
String |
Exception details |
status |
Integer |
Status code |
timeStamp |
String |
Timestamp |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
schema |
String |
Summary |
schemas |
Array of strings |
Summary list |
detail |
String |
Exception details |
status |
Integer |
Status code |
timeStamp |
String |
Timestamp |
Status code: 409
Parameter |
Type |
Description |
---|---|---|
schema |
String |
Summary |
schemas |
Array of strings |
Summary list |
detail |
String |
Exception details |
status |
Integer |
Status code |
timeStamp |
String |
Timestamp |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
schema |
String |
Summary |
schemas |
Array of strings |
Summary list |
detail |
String |
Exception details |
status |
Integer |
Status code |
timeStamp |
String |
Timestamp |
Example Request
Creating a user
POST https://{hostname}/{tenant_id}/scim/v2/Users { "externalId" : "123456", "userName" : "xxx", "name" : { "formatted" : "xxx", "familyName" : "xxx", "givenName" : "xxx", "middleName" : "xxx", "honorificPrefix" : "xxx", "honorificSuffix" : "xxx" }, "displayName" : "xxx", "nickName" : "xxx", "profileUrl" : "xxx", "emails" : [ { "value" : "xxx", "type" : "work", "primary" : true } ], "addresses" : [ { "formatted" : "xxx", "streetAddress" : "xxx", "locality" : "xxx", "region" : "xxx", "postalCode" : "123456", "country" : "xxx", "type" : "work", "primary" : true } ], "phoneNumbers" : [ { "value" : "xxx", "type" : "work", "primary" : true } ], "userType" : "xxx", "title" : "xxx", "preferredLanguage" : "zh-CN", "locale" : "zh-CN", "timezone" : "xxx", "active" : true, "schemas" : [ "urn:ietf:params:scim:schemas:core:2.0:User" ] }
Example Response
Status code: 201
Successful
{ "id" : "ac6aa714-daa7-1aaa-aaa2-6715aaaa4dd9", "externalId" : "123456", "meta" : { "resourceType" : "User", "created" : "2023-04-08T14:53:43Z", "lastModified" : "2023-04-08T14:53:43Z" }, "schemas" : [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "userName" : "xxx", "name" : { "formatted" : "xxx", "familyName" : "xxx", "givenName" : "xxx", "middleName" : "xxx", "honorificPrefix" : "xxx", "honorificSuffix" : "xxx" }, "displayName" : "xxx", "nickName" : "xxx", "title" : "xxx", "userType" : "xxx", "preferredLanguage" : "zh-CN", "locale" : "zh-CN", "timezone" : "xxx", "active" : true, "emails" : [ { "value" : "xxx", "type" : "work", "primary" : true } ], "addresses" : [ { "formatted" : "xxx", "streetAddress" : "xxx", "locality" : "xxx", "region" : "xxx", "postalCode" : "123456", "country" : "xxx", "type" : "work", "primary" : true } ], "phoneNumbers" : [ { "value" : "xxx", "type" : "work", "primary" : true } ] }
Status Codes
For details, see Status Codes.
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot