Admin API : Doc update request


I tried update user realm roles with my own backend using Admin API. In order to delete or add realms roles to users doc says we have to send an array of roles using roles representation.

I use Keycloak 13 in a docker container (jboss/keycloak:13.0.0)


POST /{realm}/users/{id}/role-mappings/realm

{ roles : [
      "id": "514d8187-6062-4ff1-9fc6-e9c81aa11976",
      "name" : "admin"

in my case in returned 500 error status code
but it work by sending an array with roles uuids
POST /{realm}/users/{id}/role-mappings/realm

{ roles : ["514d8187-6062-4ff1-9fc6-e9c81aa11976"] }

It seems to also work this way with delete role.

It can help if someone is blocked or if members of the community can update the documentation.