# Mapping groups to users

**URL:** <https://discuss.elastic.co/t/mapping-groups-to-users/106257>\
**Category:** Elasticsearch\
**Created:** [November 2, 2017, 9:57pm UTC](https://discuss.elastic.co/t/mapping-groups-to-users/106257 "2017-11-02T21:57:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jagrutsharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jagrutsharma/32/22585_2.png) [@jagrutsharma](https://discuss.elastic.co/u/jagrutsharma)\
**Post date:** [November 2, 2017, 9:57pm UTC](https://discuss.elastic.co/t/mapping-groups-to-users/106257/1 "2017-11-02T21:57:14Z")

</div>

Hi - Is there a way to define mapping between groups and users, i.e. what users are which groups? Looked at this link ([https://www.elastic.co/guide/en/x-pack/5.4/mapping-roles.html](https://www.elastic.co/guide/en/x-pack/5.4/mapping-roles.html)), but could not figure out where group-user mapping is done.

Thanks.

---

<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:** [November 2, 2017, 10:43pm UTC](https://discuss.elastic.co/t/mapping-groups-to-users/106257/2 "2017-11-02T22:43:00Z")

</div>

X-Pack Security doesn't have groups, just roles.  
You map users directly to roles.

The _groups_ in the link you posted are groups that come from an external source like LDAP or Active Directory. We can use the groups defined in those sources as a way of determining which roles a user has.

Perhaps you can explain what problem you're trying to solve and we can offer a suggested solution.

---

<div class="post-metadata">

**Author:** ![jagrutsharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jagrutsharma/32/22585_2.png) [@jagrutsharma](https://discuss.elastic.co/u/jagrutsharma)\
**Post date:** [November 3, 2017, 4:59pm UTC](https://discuss.elastic.co/t/mapping-groups-to-users/106257/3 "2017-11-03T16:59:05Z")

</div>

Thanks Tim. I have an application that supports permission-based access for users and groups. Groups are supported even in non-AD scenario. I'm trying to figure out how to support the application's security model in Elasticsearch for the application's data that is indexed.

For a user in the application, a role can be created in ES and assigned to the user in ES.  
For a group in the application (in non-AD case), I'm trying to figure out how to apply roles for the group to the users within it.

---

<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 1, 2017, 4:59pm UTC](https://discuss.elastic.co/t/mapping-groups-to-users/106257/4 "2017-12-01T16:59:10Z")

</div>

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