Patch a User
To update only specific attributes of an existing user, send a PATCH request to /Users/$USER_ID. The PATCH operation is defined by RFC-7644 §3.5.2.
The request body MUST contain a valid SCIM PATCH request with a "schemas" value of "urn:ietf:params:scim:api:messages:2.0:PatchOp" and an "Operations" array with one or more PATCH operations.
Values in the request body for immutable or read-only fields (as defined in RFC-7643 §4.1) will be ignored. Fields that are omitted from the request body will be left unchanged.
Important implementation notes:
- The Beyond Identity SCIM server currently does not support atomic PATCH operations
- The server supports two types of PATCH operations:
- Email Update: Must use "add" operation with path "emails" and value containing the email object (see "Update Email" example)
- Generic Update: A path which isn't equal to "emails" is ignored and the value must be a JSON object representing the user resource
- If a request contains multiple operations, the request may be partially applied:
- The server first validates the overall request schema and attribute types
- Operations are then applied sequentially in the order provided
- If any operation fails, processing stops immediately
- Previously successful operations remain applied
- The error response does not indicate which operation failed or which operations were applied
- To determine the current state, clients should issue a GET request after receiving an error
Important notes about email handling:
- Only one email address is supported per user
- The email must be marked as primary (primary: true)
- If multiple email addresses are provided, only the primary email will be used and all others will be ignored
Request
- Base URLhttps://api.byndid.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
ID of the user.
Request body
Example request
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
]
}Response
Successfully updated the User resource. The response contains the full representation of the modified User, including any server-side changes and read-only attributes as specified in RFC-7644 §3.5.2.
Example response
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"id": "ed9fcce6-ec82-458e-ae58-e2d975cfc32d",
"externalId": "external-id-abcdef",
"userName": "test_user",
"displayName": "Test User",
"active": true,
"emails": [
{
"primary": true,
"value": "test@test.com",
"type": "work"
}
],
"name": {
"givenName": "Barbara",
"familyName": "Jensen"
},
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
"employeeNumber": "10.164682/g9j6r80"
},
"groups": [
{
"value": "e9e30dba-f08f-4109-8486-d5c6a331660a",
"$ref": "../Groups/e9e30dba-f08f-4109-8486-d5c6a331660a",
"type": "direct"
}
],
"meta": {
"resourceType": "Group",
"created": "2022-04-07T07:23:33Z",
"lastModified": "2023-03-30T07:00:14Z",
"location": "Groups/ed9fcce6-ec82-458e-ae58-e2d975cfc32d",
"version": "W/0"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.