Page optimized for desktop experience. Please use a desktop browser for best compatibility.

Patch User Data

The Patch User Data endpoint partially edits the data details of a User account. Use this endpoint to update specific user fields you designate. You do not need to provide the user fields that you are not changing.

If the User is an LDAP user, only Roles, Groups, and Preferred Language may be updated.

PATCH
/api/v2/users/{userId}

Usage Notes

  • Only fields that are able to be modified by the PUT endpoint are allowed to be modified.
  • Attribute names MUST start with an Uppercase letter. Example: FirstName NOT firstName.

Request Body

application/jsonpatch

Refer to http://jsonpatch.com/ for the format of the request body.

Patch operations on User details editable fields [Email, FirstName, LastName, Title, Phone, Language, RoleIds, GroupIds]

Operations supported:

  • add
  • remove
  • copy
  • replace
  • test
  • move

Body Examples

[
{"op": "replace", "path": "/FirstName", "value": "Mrrrrr"}
]
[
{"op": "replace", "path": "/LastName", "value": "Mrrrrr"}
]
[
{"op": "replace", "path": "/Phone", "value": "3216549875"}
]
[
{"op": "remove", "path": "/Title"}
]
[
{"op": "add", "path": "/FirstName", "value": "Mister."}
]
[
{"op": "remove", "path": "/GroupIds/0"}
]

Response Messages

Successful response

Unauthorized error

User does not exit

Conflict error

Internal server error