Hi
we got some legacy scripts that are using the admin CLI that are responsible to the initial user creation when creating a new KC container
we are adding a user to a group like this:
kcadm.sh update users/$USER_ID/groups/$GRP_ID -r nanolock -s realm=nanolocksec -s userId=$USER_ID -s groupId=GRP_ID -n
I got some questions:
-
what is the “-n” parameter doing ? - in the documentation is says: “The last parameter (
-n) forces a so called ‘no-merge’ update which performs a PUT only, without first doing a GET to retrieve the current state of the resource. In this case, it is necessary sincereset-passwordendpoint doesn’t support GET.” -
if I want to add a user to 2 groups and I want it to be in 2 single commands - do i need the “-n” parameter or not?
for example:
kcadm.sh update users/$USER_ID/groups/$GRP_ID -r nanolock -s realm=nanolocksec -s userId=$USER_ID -s groupId=GRP_ID -n
kcadm.sh update users/$USER_ID/groups/$GRP2_ID -r nanolock -s realm=nanolocksec -s userId=$USER_ID -s groupId=GRP2_ID -n
- should we specify the “userId” and “groupId” parameters? I think it’s redundant since those values are part of the endpoint (i.e. URL)
thanks for any help