Reputation: 113
I’m facing an issue with Keycloak LDAP integration related to user synchronization. The LDAP sync works fine when a user only exists in LDAP—Keycloak automatically creates the user upon sync. However, when a user already exists in Keycloak and I later create the same user in LDAP (with the same username), Keycloak refuses to link or sync the LDAP user to the existing Keycloak user.
[org.keycloak.storage.ldap.LDAPStorageProviderFactory] User with ID 'alabolaya' is not updated during sync as they already exist in Keycloak database but are not linked to federation provider 'ldap'
4.If I delete the user in Keycloak, the LDAP sync creates the user again without issues.
**#Checked attribute mapping:
Ensured that sAMAccountName is mapped to username:Set UUID LDAP Attribute to sAMAccountName instead of objectGUID. Database-level linking attempts:
Tried updating the federation_link in the user_entity table:Attempted to insert entries into the federated_user table, but Keycloak still doesn’t recognize the link. Permissions Check:
Verified that the Keycloak DB user has full permissions on all relevant tables (user_entity, federated_user, user_federation_provider).
Upvotes: 0
Views: 63