# Populating name and email fields when using LDAP authentication

**URL:** <https://discuss.elastic.co/t/populating-name-and-email-fields-when-using-ldap-authentication/183532>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [May 30, 2019, 1:02pm UTC](https://discuss.elastic.co/t/populating-name-and-email-fields-when-using-ldap-authentication/183532 "2019-05-30T13:02:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackjefferson](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jackjefferson](https://discuss.elastic.co/u/jackjefferson)\
**Post date:** [May 30, 2019, 1:02pm UTC](https://discuss.elastic.co/t/populating-name-and-email-fields-when-using-ldap-authentication/183532/1 "2019-05-30T13:02:31Z")

</div>

I've set up LDAP authentication using a trial license of Elasticsearch 7.1. I've got the authentication working with user-search mode, but the "full\_name" and "email" attributes are null. How do I populate these with values from LDAP?

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [May 30, 2019, 3:07pm UTC](https://discuss.elastic.co/t/populating-name-and-email-fields-when-using-ldap-authentication/183532/2 "2019-05-30T15:07:51Z")

</div>

We don't map these LDAP attributes by default. You need to configure the [`metadata`](https://www.elastic.co/guide/en/elasticsearch/reference/7.1/security-settings.html#ref-ldap-settings) setting in the realm configuration. The necessary LDAP Attributes would be `cn` and `mail` .

Note that this will not make the full name and email viewable in Kibana when the users are logged in, but will be available in the metadata object in case you want to use them in role mappings.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 27, 2019, 3:07pm UTC](https://discuss.elastic.co/t/populating-name-and-email-fields-when-using-ldap-authentication/183532/3 "2019-06-27T15:07:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
