Use sAMAcountName from ldap as username

I have just tested it in 4.1.0.Final and there it works when you change the Username LDAP attribute to sAMAccountName and additionally the LDAP Attribute in the username mapper also to sAMAccountName.

I tried some mappers (especially username) but with no luck.

Your question suggest, that you already tried doing something in the username mappers. So you were definetly on the right track. Either there was a bug in your version, or the two fields didn't match correctly.


For me, it worked. Please find the below process:

1) In User Federation -> LDAP Provider -> There is a setting called "UserName LDAP Attribute". (as shown here ldap provider settings)

2) Select Mappers tab and edit "username" mapper and change to following settings: username mapper settings

Tags:

Ldap

Keycloak