Repository navigation
Is there any way with kcadm.sh to create an organization and add members in it? #35572
|
I see that it is not reflected in the documentation and I do not know if it is not possible yet or if it is not documented: https://wjw465150.gitbooks.io/keycloak-documentation/content/server_admin/topics/admin-cli.html To create the organization I see that it is like this: ./kcadm.sh create organizations -r myRealm -s alias=myAlias -s name=myName -s domains[0]=myDomainBut to add a member even though I think I'm doing it right, it doesn't find the user and I know it exists: ./kcadm.sh create "organizations/{ORGANIZATION_ID}/members" -r myRealm -s id=myUserIdI get: |
Replies: 2 comments
|
I also ran into this. Got it to work by sending the user ID as the whole request body ( |
|
A short snippet that acquires the IDs (user and organization) before running |
I also ran into this. Got it to work by sending the user ID as the whole request body (
-b), instead of JSON (-s id=...). That endpoint is a little odd it says it accepts JSON but really it's just plain text with just the user ID. See #34401