0
votes

we are using synchronize function to get all users from LDAP into keycloak. I want to get custom attribute "User logon name" which is available in LDAP. mapper setting which is already done is getting username, first name, last name, mail. how do i change mapper setting to get "User logon name" from LDAP and save it into username field of keycloak.? i have performed following steps but no luck:

  1. changed mapper "LDAP attribute = "User logon name"
  2. synchronize all users

any guideline would be appreciated.

1

1 Answers

0
votes

From what I understand you want to map a field called "User logon name" from LDAP into a field called username in Keycloak. Try the following:

  • Go to Realm where the LDAP is configured;
  • Go to User Federation;
  • Select the LDAP in question;
  • In the Setting tab set the field "Username LDAP Attribute" to "User logon name";
  • Click [Save];
  • The switch the tab to Mappers;
  • Select username;
  • edit "LDAP Attribute" to "User logon name"
  • Click [Save]; and tried it out.