I am using Keycloak docker image 21.0.2 (the latest one).
I make a PUT request to this URL:
http://localhost:8080/admin/realms/custom-realm/users/14905db1-5229-4110-bfbb-df13845a4f52
and with this JSON body to edit a user's attributes:
{
"attributes": {
"organization_id": "1"
}
}
The problem is that this wipes out all user attributes and I want it to keep the old ones as they are used for other functionalities and cannot be wiped out.
I just want to append or replace 'organization_id' value in the list of user attributes.
I think it should be a PATCH request but Keycloak doesn't have one for users. Is there any way to make this work?
I tried to update user attributes through the ADMIN REST API but I think a PATCH method is missing...
enabled
flag and the role, using theUserResource.update()
method and all other attributes (firstname, email, other attributes) stayed the same. – Jameljamerson