Unable to register a user on RH-SSO with LDAP error message: "Caused by: javax.naming.NameAlreadyBoundException: [LDAP: error code 68 - Entry Already Exists]"

Solution Verified - Updated -

Issue

RH-SSO is throwing following exception when trying to create a user within AD instance:

2020-05-20 16:58:44,607 WARN  [org.keycloak.services.resources.admin.UsersResource] (default task-4) Could not create user: org.keycloak.models.ModelException: Error creating subcontext [cn=\ ,dc=example,dc=org]
    at org.keycloak.storage.ldap.idm.store.ldap.LDAPOperationManager.createSubContext(LDAPOperationManager.java:617)
    at org.keycloak.storage.ldap.idm.store.ldap.LDAPIdentityStore.add(LDAPIdentityStore.java:96)
    at org.keycloak.storage.ldap.LDAPUtils.addUserToLDAP(LDAPUtils.java:71)
    at org.keycloak.storage.ldap.LDAPStorageProvider.addUser(LDAPStorageProvider.java:269)
    at org.keycloak.storage.UserStorageManager.addUser(UserStorageManager.java:147)
    at org.keycloak.models.cache.infinispan.UserCacheSession.addUser(UserCacheSession.java:768)
    at org.keycloak.services.resources.admin.UsersResource.createUser(UsersResource.java:117)

Environment

  • Red Hat Single Sign-On (RH-SSO)
    • 7
  • Ldap User registration
  • Active Directory

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content