[keycloak-dev] Migrate Users to new Realm

Marek Posolda mposolda at redhat.com
Mon Feb 9 04:30:37 EST 2015


Yes. There is also possibility to directly edit DB and for specified 
users, edit the field REALM_ID and point to different realms. But both 
approaches could theoretically lead to some issues, especially if you 
are going to enable federation providers or social mappings.

For example:
- Realm "foo" has enable LDAP federation provider. User "john" is linked 
to LDAP federation provider with ID "123"
- Then you want to migrate "john" to realm "bar". But realm "bar" 
doesn't have LDAP provider enabled. Or it has it enabled but with 
different ID then "123" . The federation link on "john" would point to 
original federation provider with ID "123" from realm "foo", which leads 
to broken federation link.

In case you want to enable federation providers or social login, I would 
recomment to start with more realms from the beginning.

Marek

On 7.2.2015 22:23, Stan Silvert wrote:
> How about export to json, edit the file, then import.  That should work.
>
> On 2/6/2015 11:36 AM, Nicholas Padilla wrote:
>> Hello All,
>>
>> I am wondering if there was a way to migrate all or a subset of users 
>> from one Keycloak Realm to another.  At this point in the project we 
>> don't want to complicate the Keycloak maintenance so had the thought 
>> that we would roll out with a single realm and move into supporting 
>> many realms later.  Is this something that is doable?
>>
>> Thanks!
>>
>> Nicholas Padilla
>> www.monstersoftwarellc.com <http://www.monstersoftwarellc.com>
>>
>>
>>   “Problems cannot be solved by the same level of thinking that
>>   created them.”
>>
>> “Learn from yesterday, live for today, hope for tomorrow. The 
>> important thing is not to stop questioning. 
>> <http://thinkexist.com/quotation/learn_from_yesterday-live_for_today-hope_for/222120.html>” 
>>
>>
>> Albert Einstein <http://thinkexist.com/quotes/albert_einstein/>
>>
>>
>> _______________________________________________
>> keycloak-dev mailing list
>> keycloak-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>
>
>
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20150209/ff9c563d/attachment.html 


More information about the keycloak-dev mailing list