I have an ldap server which I'm able to connect to through LDAP Apache Directory Studio. The settings in the studio are:
Hostname: ldap.company.com
Port: 389
Encryption Method: No Encryption
Provider: Apache Directory LDAP Client API
Authentication Method: Simple Authentication
BindDn or user: domain\user
Bind password: password
The same settings in the code:
LDAPConnection connection = new LDAPConnection("ldap.company.com", 389, "domain\\user", "password");
But the code is throwing:
LDAPException(resultCode=49 (invalid credentials), errorMessage='80090308: LdapErr: DSID-0C0903D9, comment: AcceptSecurityContext error, data 52e, v2580
at com.unboundid.ldap.sdk.LDAPConnection.bind(LDAPConnection.java:2182)
at com.unboundid.ldap.sdk.LDAPConnection.<init>(LDAPConnection.java:671)
at com.unboundid.ldap.sdk.LDAPConnection.<init>(LDAPConnection.java:564)
at ldapstest.LDAPSTest.getConnection(LDAPSTest.java:21)
at ldapstest.LDAPSTest.main(LDAPSTest.java:46)
Is the domain\username style not supported in UnboundId?