I need to retrieve user information based on the email of the user. I have see some subject discussing about this but i don't find one with ldapTemplate that respond to the problem.
Actually a user can login through LDAP. I need to retrieve for example the name of the user based on user's mail.
For connection i'm using this, it works :
return ldapTemplate.authenticate(LdapUtils.emptyLdapName(), filter.encode(), password);
To retrieve some information (displayName, department) i tried this without success :
System.out.println(ldapTemplate.search("OU=UTILISATEURS,DC=dig,DC=intra,DC=company,DC=fr", "(&(objectclass=user)(sAMAccountName=me@company.com))", new LdapEntryIdentificationContextMapper()));
Errro : [LDAP: error code 32 - 0000208D: NameErr: DSID-03100288]
Does someone know how can i get those informations ?