I currently have a Spring-boot application that is taking Employee data from Active Directory, and displaying them as JSON.
However, I don't want to link directly to Active Directory, I would like to use Active Directory Lightweight services.
I assumed I could just set up the connection and connect in the same way, but I keep getting an error 49 (invalid credentials) error. I am using the same credentials that work on Active Directory.
This is the Spring.xml configuration credentials:
<bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource"> <property name="url" value="ldap://example.com:389" /> <property name="base" value=" DC=example,DC=com" /> <property name="userDn" value="[email protected]" /> <property name="password" value="password" /> </bean> <bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate"> <constructor-arg ref="contextSource" /> <property name="ignorePartialResultException" value="true" /> </bean>
If I try and change the url to the AD LDS url (that uses localhost), I get an Ldap error 49. Does anybody have experience with these technologies? Please help.
If I try to use my Active directory domain username I get:
The authentication failed - [LDAP: error code 49 - 8009030C: LdapErr: DSID-0C0903C4, comment: AcceptSecurityContext error, data 2030, v295a
If I try and use the userDN I get:
The authentication failed - [LDAP: error code 80 - 80090304: LdapErr: DSID-0C0903C4, comment: AcceptSecurityContext error, data 20ee, v295a