I have read almost everything about Spring/Security/Ldap and ActiveDirectory on stackoverflow. Even if I found useful tips and hints, I wasn\'t able to solve my problem.
In Spring Security 4.1.1 / SpringBoot 1.4.0 environment, I do this like that (in Java):
@Configuration
public class AuthenticationConfiguration extends GlobalAuthenticationConfigurerAdapter
{
public void init (AuthenticationManagerBuilder aAuth) throws Exception
{
ActiveDirectoryLdapAuthenticationProvider
myProvider = new ActiveDirectoryLdapAuthenticationProvider (ldapDomain, ldapUrl);
aAuth.authenticationProvider (myProvider);
aAuth.eraseCredentials (false);
}
}
I don't run into any problem and the user can logon using the sAMAccountName
.