# Role and Active Directory

**URL:** https://discuss.elastic.co/t/role-and-active-directory/120862
**Category:** Elasticsearch
**Created:** [February 21, 2018, 2:12pm UTC](https://discuss.elastic.co/t/role-and-active-directory/120862 "2018-02-21T14:12:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![flochon](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@flochon](https://discuss.elastic.co/u/flochon)
#### Post date: [February 21, 2018, 2:12pm UTC](https://discuss.elastic.co/t/role-and-active-directory/120862/1 "2018-02-21T14:12:27Z")

</div>

I make a connection to an active directory but all my users haven't access to the role "superuser" that I precise in the file role\_mapping.yml like here [https://www.elastic.co/guide/en/x-pack/current/active-directory-realm.html](https://www.elastic.co/guide/en/x-pack/current/active-directory-realm.html)

```auto
superuser:
   - "CN=test,OU=test,OU=test,OU=test,DC=test,DC=local"

```

How to resolve this problem ?

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [February 21, 2018, 11:48pm UTC](https://discuss.elastic.co/t/role-and-active-directory/120862/2 "2018-02-21T23:48:59Z")

</div>

There really isn't lot of information in your post to help us sort out your issue.

Start with the [Authenticate API](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/security-api-authenticate.html).

That will show you the roles that are being granted, and the user's metadata which will include their LDAP DN and groups.  
My guess is that you are not resolving the correct groups, but unless you are able to provide more details about your issue, I can't offer anything more concrete than that.

---

<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: [March 21, 2018, 11:49pm UTC](https://discuss.elastic.co/t/role-and-active-directory/120862/3 "2018-03-21T23:49:05Z")

</div>

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