# Role mapping with native authentication realm

**URL:** <https://discuss.elastic.co/t/role-mapping-with-native-authentication-realm/157032>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [November 16, 2018, 11:00am UTC](https://discuss.elastic.co/t/role-mapping-with-native-authentication-realm/157032 "2018-11-16T11:00:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jetnet](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jetnet](https://discuss.elastic.co/u/jetnet)\
**Post date:** [November 16, 2018, 11:00am UTC](https://discuss.elastic.co/t/role-mapping-with-native-authentication-realm/157032/1 "2018-11-16T11:00:54Z")

</div>

I'd like to map all `native` users with a prefix in the `username` to a role, but the role mapping seems to be applied to [external realms](https://www.elastic.co/guide/en/elastic-stack-overview/6.5/mapping-roles.html) only.  
Is it correct? Thanks!

---

<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 14, 2018, 11:01am UTC](https://discuss.elastic.co/t/role-mapping-with-native-authentication-realm/157032/2 "2018-12-14T11:01:01Z")

</div>

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