title: Spring boot ldap Authentication Error [LDAP: error code 49 - Invalid Credentials]
body: <p>I am trying to connect to the ldap server to fetch user data using springboot. My spring boot application.properties as</p>
  <pre><code>spring.ldap.base=dc=example,dc=com
  spring.ldap.password=Secret
  spring.ldap.username=uid=admin,ou=user
  spring.ldap.urls=ldap://myServerIP:389/
  spring.data.ldap.repositories.enabled=true
  </code></pre>
  <p>when I try to get the data using the rest controller I am getting an error of code 49 stating</p>
  <pre><code>ERROR 3535 --- [nio-8080-exec-8] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.ldap.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]; nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]] with root cause
  
  javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]
  </code></pre>
  <p>As I am new to ldap data fetching am not sure whether this is caused from the ldap or from the springboot connectivity. If could anyone explain and give me solution would be great</p>