[keycloak-user] Use RestAPI to add roles to groups

O'Callaghan, John john.ocallaghan at accenture.com
Tue Nov 7 07:58:45 EST 2017


Hi all

A similar question to before. Am trying to use the rest api to add existing access roles to an existing group.
I have tried to use:

PUT /auth/admin/realms/REALM_NAME/groups/GROUP_ID
With data {'realmRoles': [LIST_OF_ROLES], 'id': gid}

Am getting a 204 back from PUT but when I look in the webui I am not seeing the assigned roles table getting updated for the group.

This is similar to a previous question I had (thanks again Marko for the response) and for fun I did try :
PUT /auth/admin/realms/REALM_ID/groups/GROUP_ID/roles/ROLE_ID
With data {'roleId': ROLE_ID, 'id': GROUP_ID, ‘realm’: REALM_NAME}

But that gave a 404.

Anyone else had this problem? Any help would be much 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