# Change user id in keycloack

**URL:** <https://forum.keycloak.org/t/change-user-id-in-keycloack/15658>\
**Category:** Getting advice\
**Created:** [May 20, 2022, 4:44pm UTC](https://forum.keycloak.org/t/change-user-id-in-keycloack/15658 "2022-05-20T16:44:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ewok2](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@ewok2](https://forum.keycloak.org/u/ewok2)\
**Post date:** [May 20, 2022, 4:44pm UTC](https://forum.keycloak.org/t/change-user-id-in-keycloack/15658/1 "2022-05-20T16:44:11Z")

</div>

Hello  
I use Keycloak version 17  
I have migrate a keycloak installation from on VM to another using the import /export Realms function.  
My keycloak serve an nextcloud login.  
My Keycloak get the user from an openldap server

But in the new Keycloak I get new ID for all user…  
And Nexcloud use this ID to identify the login user.  
=\> now when connecting to nextcloud, all user have a new empy account… (the old account exist but is no more accessible through keycloak login)

Is there a way to change the ID number of a user ?  
I did not found a way in the web interface.  
Is it possible directly in the database?

Thanks
