'How to link / export existing Keycloak user to LDAP

I'm using Keycloak and just setup some OpenLDAP. Importing from LDAP to Keycloak works fine. Even new registrations and updates to users are synced nicely. But I can't find any way to:

a) Export existing Keycloak users to LDAP
b) Linking existing Keycloak users to existing LDAP users

when users already exist in Keycloak, during import I get the following error:

23:56:39,507 WARN [org.keycloak.storage.ldap.LDAPStorageProviderFactory] (default task-22) User 'foo' is not updated during sync as he already exists in Keycloak database but is not linked to federation provider 'ldap'

Any Ideas? Did I missed something obvious?



Solution 1:[1]

To send users to LDAP please try to use options "Edit mode: Writable" and "Sync Registrations: ON" on ldap configuration page in Keycloak (User Federation->Ldap).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Piotr