# I have a question, can I take the ldap attribute to create a role map? and the following is the ldap configuration in elasticsearch.yml

**URL:** <https://discuss.elastic.co/t/i-have-a-question-can-i-take-the-ldap-attribute-to-create-a-role-map-and-the-following-is-the-ldap-configuration-in-elasticsearch-yml/346676>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [November 8, 2023, 3:04am UTC](https://discuss.elastic.co/t/i-have-a-question-can-i-take-the-ldap-attribute-to-create-a-role-map-and-the-following-is-the-ldap-configuration-in-elasticsearch-yml/346676 "2023-11-08T03:04:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tsabitul\_azmi1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsabitul_azmi1/32/127146_2.png) [@Tsabitul\_azmi1](https://discuss.elastic.co/u/Tsabitul_azmi1)\
**Post date:** [November 8, 2023, 3:04am UTC](https://discuss.elastic.co/t/i-have-a-question-can-i-take-the-ldap-attribute-to-create-a-role-map-and-the-following-is-the-ldap-configuration-in-elasticsearch-yml/346676/1 "2023-11-08T03:04:30Z")

</div>

xpack:  
security:  
authc:  
realms:  
ldap:  
ldap1:  
order: 0  
url: "ldap://xxx.xxx.xxx.xxx:389"  
bind\_dn: "uid=xxxxx,ou=accounts,o=xxx,dc=xx,dc=xx"  
#user\_search.attribute: "branchalias"  
#user\_group\_attribute: "branchalias"  
group\_search.user\_attribute: "branchalias"  
#user\_dn\_templates:  
#-"ou=accounts,o=xxx,dc=xxx,dc=xxx"  
#-"uid={0},ou=xxxxx,o=xxx,dc=xxx,dc=xxx"  
#attribute: "uid"  
user\_search:  
base\_dn : "ou=accounts,o=xxx,dc=co,xxx=xxx"  
#filter: "(uid={0})"  
#attribute: "branchalias"  
#group\_search:  
#base\_dn: "ou=accounts,o=xxx,dc=xxx,dc=xxx"  
files:  
role\_mapping: "/etc/elasticsearch/role\_mapping.yml"  
#unmapped\_groups\_as\_roles: false  
#metadata :  
# - branchalias  
#- uid  
#- elasticrole  
#- ldap\_dn  
#- ldap\_groups

---

<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:** [December 6, 2023, 3:04am UTC](https://discuss.elastic.co/t/i-have-a-question-can-i-take-the-ldap-attribute-to-create-a-role-map-and-the-following-is-the-ldap-configuration-in-elasticsearch-yml/346676/2 "2023-12-06T03:04:36Z")

</div>

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