[keycloak-user] API Create user

Jannes Vandepitte jannes.vandepitte at gmail.com
Tue Nov 6 08:17:44 EST 2018


Hi,

I’m having trouble with usage of the API. When creating a user via POST on
the /users resource I can add a user no problem. But when I try to create a
user and set it’s role/groups at the same time, it just ignores the
provided roles and groups.

Body:

{
"username": "testerrr",
"email": "testt at aptus.bee",
    "realmRoles": ["0085814a-b946-494b-924d-c8bd20fe077c"],
    "groups":["098d95a5-9875-4e3c-90ab-cfacdef70fed"]
}

I gave the user that uses the api realm-admin roles just to make sure it
wasn’t a permission problem.


Any ideas on how to fix this (without adding 2 extra calls for adding the
group and the role)

Thanks in advance,

Jannes V


More information about the keycloak-user mailing list