# The file role\_mapping.yml is not loaded or used

**URL:** <https://discuss.elastic.co/t/the-file-role-mapping-yml-is-not-loaded-or-used/204521>\
**Category:** Elasticsearch\
**Created:** [October 21, 2019, 4:11pm UTC](https://discuss.elastic.co/t/the-file-role-mapping-yml-is-not-loaded-or-used/204521 "2019-10-21T16:11:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cglencr](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@cglencr](https://discuss.elastic.co/u/cglencr)\
**Post date:** [October 21, 2019, 4:11pm UTC](https://discuss.elastic.co/t/the-file-role-mapping-yml-is-not-loaded-or-used/204521/1 "2019-10-21T16:11:03Z")

</div>

I am attempting to use the Active Directory realm for authentication via Kibana. But believe I have the format for a AD account wrong. I am using the distinguished name but think for individual users it is not what I should use.

I have updated the role\_mapping.yml file as:

```
      superuser:
        - "CN=Lastname\, First,OU=TheOU,DC=ad,DC=company,DC=com"

```

Restart the ES service.  
I can then login with my AD account but receive this message:  
{"statusCode":403,"error":"Forbidden","message":"Forbidden"}

---

<div class="post-metadata">

**Author:** ![cglencr](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@cglencr](https://discuss.elastic.co/u/cglencr)\
**Post date:** [October 21, 2019, 5:41pm UTC](https://discuss.elastic.co/t/the-file-role-mapping-yml-is-not-loaded-or-used/204521/2 "2019-10-21T17:41:20Z")

</div>

I believe the issue is the format of the CN.  
My company has it as:  
Lastname, First  
Which is how special characters like a comma are to be represented. Is this acceptable by ElasticSearch? Because it is the correct format for LDAP or Active Directory.

---

<div class="post-metadata">

**Author:** ![cglencr](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@cglencr](https://discuss.elastic.co/u/cglencr)\
**Post date:** [October 24, 2019, 6:39pm UTC](https://discuss.elastic.co/t/the-file-role-mapping-yml-is-not-loaded-or-used/204521/3 "2019-10-24T18:39:32Z")

</div>

Sorry I meant to say to show a comma in a CN you need to escape as per LDAP rules.  
LastName, First  
should be valid but it appears ES is not parsing it correctly.

---

<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:** [November 21, 2019, 6:39pm UTC](https://discuss.elastic.co/t/the-file-role-mapping-yml-is-not-loaded-or-used/204521/4 "2019-11-21T18:39:35Z")

</div>

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