<div dir="ltr">Depending on the amount of users I'd use either partial import through the admin console (if you don't have more than a thousand or so users) or use the admin REST endpoints if you have quite a lot of users.</div><div class="gmail_extra"><br><div class="gmail_quote">On 20 July 2016 at 11:52, Paulo Pires <span dir="ltr"><<a href="mailto:pires@littlebits.cc" target="_blank">pires@littlebits.cc</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I'm in the process of migrating from an in-house user-role storage to Keycloak and I'm looking for programmatic (Java) ways to migrate all current users to the new storage. And I need your help to figure out the best approach.</div><div><br></div><div>At first, when reading KC documentation, I believed I could easily achieve this by implementing a User Federation provider but after diving a little more into it, and looking for examples, I can't see a way to migrate all users on-demand but simply one user at a time, possible during log-in.</div><div><br></div><div>Next, I tried and look into ways, such as admin-cli, REST, etc but nothing strikes me as the solution to use.</div><div><br></div><div>Here's what I was hoping to deliver:</div><div>* Get all roles and users from my soon-to-be deprecated storage, e.g. MySQL tables</div><div>* Add roles to KC</div><div>* Iterate users and add user to KCĀ + map rolesĀ + update password hashes (here I know I need to implement a HashProvider)</div><div><br></div><div>Any hints will be appreciated!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Pires</div></font></span></div>
<br>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div>