[keycloak-user] Error creating realm role with attributes

Rafael Tovar. rafatov10 at gmail.com
Mon Jun 17 04:48:28 EDT 2019


Hi everybody,
I'm trying to create a realm role with custom attributes.
When i make this POST request:
/auth/admin/realms/master/roles
with the following body:
{
   "name":"test_user",
   "description": "im a test user",
   "attributes":  {
         "color": "#555"
   }
}
I get the error: Cannot deserialize instance of `java.util.ArrayList` out
of VALUE_STRING token

And when i try the request with this body:
{
   "name":"test_user",
   "description": "im a test user",
   "attributes":  {
         "color": ["#555"]
    }
}
I get a 201 but the role is created without the color attribute.

Thanks,
Rafael.


More information about the keycloak-user mailing list