# Ldap authentication type "none" configuration issue

**URL:** <https://forum.keycloak.org/t/ldap-authentication-type-none-configuration-issue/13047>\
**Category:** Getting advice\
**Tags:** ldap\
**Created:** [January 13, 2022, 4:23pm UTC](https://forum.keycloak.org/t/ldap-authentication-type-none-configuration-issue/13047 "2022-01-13T16:23:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dkarag](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dkarag/32/4797_2.png) [@Dkarag](https://forum.keycloak.org/u/Dkarag)\
**Post date:** [January 13, 2022, 4:23pm UTC](https://forum.keycloak.org/t/ldap-authentication-type-none-configuration-issue/13047/1 "2022-01-13T16:23:03Z")

</div>

**Situation:**  
I want to use LDAP( ActiveDirectory) authentication from keycloak.  
The authentication type is set to “none” ( Anonymous)  
I set the Users DN as follows —\> OU=Ext,OU=X117,OU=ID,OU=Data,DC=example,DC=com

And the error i get is tho following

15:20:28,286 ERROR [org.keycloak.storage.ldap.idm.store.ldap.LDAPOperationManager] (default task-193) Could not query server using DN [OU=Ext,OU=X117,OU=ID,OU=Data,DC=example,DC=com] and filter [(&(cn=testuser)(objectclass=person)(objectclass=organizationalPerson)(objectclass=user))]: javax.naming.NamingException: [LDAP: error code 1 - 000004DC: LdapErr: DSID-0C0907E9, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v2580]; remaining name ‘OU=Ext,OU=X117,OU=ID,OU=Data,DC=example,DC=com’

When I set the ‘simple’ authentication method and using my user

CN=testuser,OU=Ext,OU=X117,OU=ID,OU=Data,DC=example,DC=com

Then everything works as expected.  
So i assume that I must modify the users DN field in a way to append the CN=“username” dynamically during execution time, as a prefix but I have no clue on how to do it. Any hint would be much appreciated!

---

<div class="post-metadata">

**Author:** ![Dkarag](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dkarag/32/4797_2.png) [@Dkarag](https://forum.keycloak.org/u/Dkarag)\
**Post date:** [January 14, 2022, 9:42am UTC](https://forum.keycloak.org/t/ldap-authentication-type-none-configuration-issue/13047/2 "2022-01-14T09:42:18Z")

</div>

Can anyone give me an example of how to configure my ldap given that the

- “bindType” = none

- and the user DN is —\> CN=testuser,OU=Ext,OU=X117,OU=ID,OU=Data,DC=example,DC=com
