Keycloack - User creation with clientRoles is not working

23 Views Asked by At

I'm trying to create a user with certain clientRoles, via Rest API. The user is created, but the roles are not assigned. This is the submitted json:

{
   "firstName":"User Creation",
   "username":"user.creation",
   "email":"[email protected]",
   "enabled":true,
   "emailVerified":false,
   "clientRoles":{
      "clientid":[
         "RoleName 1"
      ]
   },
   "groups":[
      "My Group"
   ],
   "requiredActions":[
      "UPDATE_PASSWORD",
      "VERIFY_EMAIL"
   ],
   "attributes":{
      "picture":[
         
      ],
      "tenants":[
         
      ]
   },
   "credentials":[
      {
         "type":"password",
         "value":"valueofPass",
         "temporary":true
      }
   ]
}

I'm using keycloack 23.

I expect the user created with the assigned Roles.

0

There are 0 best solutions below