Create User with SCIM
Create a user with SCIM.
POST
/api/{version}/scim/v2/UsersHeaders
Section link for Headers| Name | Description |
|---|---|
Accept | application/json (default) or application/scim+json |
Content-Type | application/json or application/scim+json |
Body Parameters
Section link for Body ParametersThe body of your request should be a JSON file with the required information for your new user. The following fields are required, but you can add any other editable field in the request. Note that an Admin may set additional fields as required in your Vault.
| Name | Description |
|---|---|
schemasrequired | A JSON array of the schemas required to create this user. These may differ depending on the fields you wish to set for this user. |
userNamerequired | The user name for the new user. Must be in the format name@domain.com, and the domain must match the Vault. |
emailsrequired | A JSON array with the email information for a user. The array must include the following sub-attributes:
|
namerequired | A JSON object for the user’s first name (givenName) and last name (familyName). |
preferredLanguagerequired | The language for the user. Value is the language abbreviation, for example, en. |
localerequired | The user’s locale, in the format language_country. For example, en_US. |
timezonerequired | The user’s timezone, for example, America/Los_Angeles. |
securityProfilerequired | A JSON object with the user’s security profile, set with the value sub-attribute. For example, "securityProfile": { "value": "system_admin__v"}. |
securityPolicyoptional | A JSON object with the user’s security policy, set with the value sub-attribute. If omitted, defaults to Basic. |
licenseTypeoptional | A JSON object with the user’s license type, set with the value sub-attribute. If omitted, defaults to full__v. |
Request
Section link for Requestcurl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/scim+json" \
--data-raw '[
{
"schemas": [
"urn:ietf:params:scim:schemas:extension:veevavault:2.0:User",
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"userName": "AbigailSmith@veepharm.com",
"emails": [
{
"value": "abigail.smith@veepharm.com",
"type": "work"
}
],
"name": {
"familyName": "Smith",
"givenName": "Abigail"
},
"preferredLanguage": "en",
"locale": "en_US",
"timezone": "America/Los_Angeles",
"urn:ietf:params:scim:schemas:extension:veevavault:2.0:User": {
"securityProfile": {
"value": "system_admin__v"
}
}
}
]' \
https://veepharm.com/api/v26.1/scim/v2/UsersResponse
Section link for Response{
"schemas": [
"urn:ietf:params:scim:schemas:extension:veevavault:2.0:User",
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"id": "114055",
"meta": {
"created": "2018-05-29T23:44:08.000Z",
"lastModified": "2018-05-29T23:44:08.000Z",
"resourceType": "User",
"location": "https://veepharm.com/api/v26.1/scim/v2/Users/114055"
},
"active": true,
"displayName": "Abigail Smith",
"emails": [
{
"value": "abigail.smith@veepharm.com",
"type": "work"
}
],
"locale": "en_US",
"name": {
"familyName": "Smith",
"givenName": "Abigail"
},
"preferredLanguage": "en",
"timezone": "America/Los_Angeles",
"userName": "AbigailSmith@veepharm.com",
"urn:ietf:params:scim:schemas:extension:veevavault:2.0:User": {
"createdBy": {
"$ref": "https://veepharm.com/api/v26.1/scim/v2/Users/61579",
"value": "61579"
},
"extendedAttributes": [
{
"name": "is_asset_portal_user__sys",
"value": "false"
}
],
"lastModifiedBy": {
"$ref": "https://veepharm.com/api/v26.1/scim/v2/Users/61579",
"value": "61579"
},
"licenseType": {
"$ref": "https://veepharm.com/api/v26.1/scim/v2/LicenseTypes/full__v",
"value": "full__v"
},
"lifecycle": "vault_membership_lifecycle__sys",
"lifecycleState": "active_state__sys",
"securityPolicy": {
"$ref": "https://veepharm.com/api/v26.1/scim/v2/SecurityPolicies/2525",
"value": "2525"
},
"securityProfile": {
"value": "system_admin__v",
"$ref": "https://veepharm.com/api/v26.1/scim/v2/SecurityProfiles/system_admin__v"
}
}
}Response Details
Section link for Response DetailsOn SUCCESS, the response includes the full details of the newly created user.