Bulk user creation in Keylock

31 views
Skip to first unread message

Shailesh Kala

unread,
Nov 7, 2022, 3:28:17 AM11/7/22
to keyclo...@googlegroups.com
Hi everyone,

I’m in a situation where I have to create a lot of users in Keylock. I’m searching for a way to bulk user creation.

I would appreciate any help.

Thanks & Regards,
Shailesh Kala

Tobias Häfner

unread,
Nov 8, 2022, 1:46:43 AM11/8/22
to Keycloak Dev
Hello,

see the documentation for import and export:

Export a realm with users in a separate file. Analyse the structure of the Json file and try to create this file on your own with your existing users.

Then import this file into a existing realm. Perhaps the import menu button in the admin-ui will also work with this file. But I don't have tested this.

Otherwise use the CLI to import.

Best regards
Tobias

Ernedin Zajko

unread,
Nov 9, 2022, 2:59:26 AM11/9/22
to keyclo...@googlegroups.com
Hi Shailesh Kala,

you can try bash script I used before:

https://gist.github.com/ezajko/f89f3b1e40f20a91fc457efb8437fc64

It used to work with some older versions (not sure how much API changed
in recent versions) - so PLEASE use with care (first on some
local/testing system).

It is not much, but it will let you start...


regards,
> --
> You received this message because you are subscribed to the Google
> Groups "Keycloak Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to keycloak-dev...@googlegroups.com
> <mailto:keycloak-dev...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/keycloak-dev/CALDVH%3DoSSKzhto6myTUvQXw3G9RHM3uD1c-dNDxmg_UY_Uh5zQ%40mail.gmail.com <https://groups.google.com/d/msgid/keycloak-dev/CALDVH%3DoSSKzhto6myTUvQXw3G9RHM3uD1c-dNDxmg_UY_Uh5zQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
ez
Reply all
Reply to author
Forward
0 new messages