[keycloak-user] Adding users to groups using restapi

O'Callaghan, John john.ocallaghan at accenture.com
Mon Nov 6 07:37:45 EST 2017



Hi All

Im trying to use the rest api to update an existing user to add them to an existing group.
The url that I am using is /auth/admin/realms/MY_REALM/users/USER_ID

Where MY_REALM is equal to my realm name and
USER_ID is equal to an existing users id.

I am sending a json doc in the PUT body and in here I have { “groups”: [“admin”], “enabled”: True }

But when I look at the users info using the WebUI I am not seeing the admin group listed in their “Group Membership” table. I do see it listed in their “Available Groups” table.

I do see that the users “enabled” flag is going from False to True after the PUT so I believe the permission to update the user is correct. But shouldn’t I see the admin group added to the Group Membership table too?

Has anyone come across this problem?
Any help would be really appreciated.
Thanks
John



________________________________

This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.
______________________________________________________________________________________

www.accenture.com


More information about the keycloak-user mailing list