title: Spring boot Ldap Authentication failing with LDAP error code 49 - 80090308 data 52e
body: <p>I am trying to use LDAP User authentication in my web application with spring security but getting <code>error 52e</code>, below is my spring security ldap authentication code:</p>
  
  <pre><code>protected void configure(AuthenticationManagerBuilder auth) throws Exception {
    auth.ldapAuthentication()
     .contextSource().url("ldap://192.168.1.5:389/DC=zonetest,DC=lk")
     .managerDn("CN=administrator@zonetest.lk,DC=zonetest,DC=lk").managerPassword("P@ssw0rd")
     .and()
     .userSearchBase("OU=SL Users")
     .userSearchFilter("(CN={0})");
  }
  </code></pre>
  
  <p>My Ldap structure is provided in the screenshot for reference :</p>
  
  <ul>
  <li><a href="https://i.stack.imgur.com/2VqXn.png" rel="nofollow noreferrer">LDAP structure</a></li>
  <li><a href="https://i.stack.imgur.com/QBmr0.png" rel="nofollow noreferrer">LDAP structure</a></li>
  </ul>
  
  <p>I am getting this error in postman client</p>
  
  <pre><code>{
      "timestamp": 1505368170503,
      "status": 401,
      "error": "Unauthorized",
      "message": "[LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903C5, comment: AcceptSecurityContext error, data 52e, v2580\u0000]; nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903C5, comment: AcceptSecurityContext error, data 52e, v2580\u0000]",
      "path": "/"
  }
  </code></pre>
  
  <p>Please help me out.</p>