you have to call a separate REST API after you create the user to add
roles/groups.
On 5/16/17 1:33 PM, Hylton Peimer wrote:
I have created a new Realm and added a role: "DOCTORS".
POST to /admin/realms/{realm}/users
With the following JSON:
{"realmRoles":["DOCTORS"],"enabled":"true","username":"drhp"}
This invocation creates the user, but the "DOCTORS" role is not assigned.
The rest call is using a bearer token obtained from an administrative user
in the master realm.
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user