Skip to content

Create a user with SCIM.

POST/api/{version}/scim/v2/Users
NameDescription
Acceptapplication/json (default) or application/scim+json
Content-Typeapplication/json or application/scim+json

The 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.

NameDescription
schemasA JSON array of the schemas required to create this user. These may differ depending on the fields you wish to set for this user.
userNameThe user name for the new user. Must be in the format name@domain.com, and the domain must match the Vault.
emailsA JSON array with the email information for a user. The array must include the following sub-attributes:
  • value: The email address in the format name@domain.com.
  • type:The email type, which is work. Other types are not supported.
  • Note that the primary sub-attribute is ignored.
nameA JSON object for the user’s first name (givenName) and last name (familyName).
preferredLanguageThe language for the user. Value is the language abbreviation, for example, en.
localeThe user’s locale, in the format language_country. For example, en_US.
timezoneThe user’s timezone, for example, America/Los_Angeles.
securityProfileA 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.
curl -X POST -H "Authorization: {SESSION_ID}" \ -H "Content-Type: application/scim+json" \ --data-binary @"C:\Vault\Users\create_users_scim.json" \ https://veepharm.com/api/v20.2/scim/v2/Users
{ "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" } } }
{ "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/v20.2/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/v20.2/scim/v2/Users/61579", "value": "61579" }, "extendedAttributes": [ { "name": "is_asset_portal_user__sys", "value": "false" } ], "lastModifiedBy": { "$ref": "https://veepharm.com/api/v20.2/scim/v2/Users/61579", "value": "61579" }, "licenseType": { "$ref": "https://veepharm.com/api/v20.2/scim/v2/LicenseTypes/full__v", "value": "full__v" }, "lifecycle": "vault_membership_lifecycle__sys", "lifecycleState": "active_state__sys", "securityPolicy": { "$ref": "https://veepharm.com/api/v20.2/scim/v2/SecurityPolicies/2525", "value": "2525" }, "securityProfile": { "value": "system_admin__v", "$ref": "https://veepharm.com/api/v20.2/scim/v2/SecurityProfiles/system_admin__v" } } }

On SUCCESS, the response includes the full details of the newly created user.