# Permissions error for creating a Enrich (.enrich-\*) index after following docs

**URL:** <https://discuss.elastic.co/t/permissions-error-for-creating-a-enrich-enrich-index-after-following-docs/314014>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [September 8, 2022, 6:00pm UTC](https://discuss.elastic.co/t/permissions-error-for-creating-a-enrich-enrich-index-after-following-docs/314014 "2022-09-08T18:00:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Madhav\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/madhav_sharma/32/102780_2.png) [@Madhav\_Sharma](https://discuss.elastic.co/u/Madhav_Sharma)\
**Post date:** [September 8, 2022, 6:00pm UTC](https://discuss.elastic.co/t/permissions-error-for-creating-a-enrich-enrich-index-after-following-docs/314014/1 "2022-09-08T18:00:04Z")

</div>

1. I tied using the dev\_tools console to create a .enrich-\* index and i got:

```auto
"action [indices:admin/create] is unauthorized for user [foo@bar.com] with roles [superuser] on restricted indices [.enrich-foobar], this action is granted by the index privileges [create_index,manage,all]"

```

1. I created a role new role called `custom-enrich` (picture attached) and a new user `metadata-setup-user`

And after doing this, I still get the error:

`elasticsearch.AuthorizationException: AuthorizationException(403, 'security_exception', 'action [indices:admin/create] is unauthorized for user [metadata-setup-user] with roles [custom-enrich,enrich_user] on restricted indices [.enrich-ec2-metadata], this action is granted by the index privileges [create_index,manage,all]')`

 ![Screen Shot 2022-09-08 at 1.25.46 PM](https://us1.discourse-cdn.com/elastic/original/3X/d/8/d8743ef0356d8c156021733b5bef87566c3631e6.png)  
 ![Screen Shot 2022-09-08 at 1.32.42 PM](https://us1.discourse-cdn.com/elastic/original/3X/3/c/3c6ab21f6750cd516669fe1386bf0d173b159d0d.png)

---

<div class="post-metadata">

**Author:** ![Madhav\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/madhav_sharma/32/102780_2.png) [@Madhav\_Sharma](https://discuss.elastic.co/u/Madhav_Sharma)\
**Post date:** [September 8, 2022, 6:19pm UTC](https://discuss.elastic.co/t/permissions-error-for-creating-a-enrich-enrich-index-after-following-docs/314014/2 "2022-09-08T18:19:40Z")

</div>

this is the output for the `GET /_security/user/_privileges` for the new user with the new role I have created.

```auto
{'cluster': ['all', 'manage', 'manage_enrich', 'manage_ingest_pipelines', 'monitor'], 'global': [], 'indices': [{'names': ['.enrich-*'], 'privileges': ['manage', 'read', 'write'], 'allow_restricted_indices': False}, {'names': ['.enrich*'], 'privileges': ['all', 'create_index', 'manage'], 'allow_restricted_indices': False}], 'applications': [], 'run_as': ['metadata-setup-user']}

```

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 8, 2022, 6:47pm UTC](https://discuss.elastic.co/t/permissions-error-for-creating-a-enrich-enrich-index-after-following-docs/314014/3 "2022-09-08T18:47:54Z")

</div>

`'allow_restricted_indices': False`

Perhaps that's your issue

`'allow_restricted_indices': true`

---

<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:** [October 6, 2022, 6:48pm UTC](https://discuss.elastic.co/t/permissions-error-for-creating-a-enrich-enrich-index-after-following-docs/314014/4 "2022-10-06T18:48:16Z")

</div>

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