# Manage\_index\_templates privilege not work in component\_template api

**URL:** <https://discuss.elastic.co/t/manage-index-templates-privilege-not-work-in-component-template-api/311029>\
**Category:** Elasticsearch\
**Created:** [July 30, 2022, 8:40am UTC](https://discuss.elastic.co/t/manage-index-templates-privilege-not-work-in-component-template-api/311029 "2022-07-30T08:40:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bryce\_Huang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bryce_huang/32/98918_2.png) [@Bryce\_Huang](https://discuss.elastic.co/u/Bryce_Huang)\
**Post date:** [July 30, 2022, 8:40am UTC](https://discuss.elastic.co/t/manage-index-templates-privilege-not-work-in-component-template-api/311029/1 "2022-07-30T08:40:46Z")

</div>

I give a test role manage\_index\_templates privilege, but it still can't put component template.kibana return 403 permission forbidden.  
In [https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-component-template.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-component-template.html) doc suggests to give manage\_index\_templates privilege to use this api.but it not work.  
Could you please tell me how to use and what this issue?  
Thanks!

```auto
  "test_user" : {
    "cluster" : [
      "manage_index_templates"
    ],
    "indices" : [],
    "applications" : [
      {
        "application" : "kibana-.kibana",
        "privileges" : [
          "space_all"
        ],
        "resources" : [
          "space:default"
        ]
      }
    ],
    "run_as" : [
      "testUser"
    ],
    "metadata" : { },
    "transient_metadata" : {
      "enabled" : true
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![Bryce\_Huang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bryce_huang/32/98918_2.png) [@Bryce\_Huang](https://discuss.elastic.co/u/Bryce_Huang)\
**Post date:** [August 6, 2022, 3:18pm UTC](https://discuss.elastic.co/t/manage-index-templates-privilege-not-work-in-component-template-api/311029/2 "2022-08-06T15:18:09Z")

</div>

this is a bug in 7.8.1,it had been fixed in 7.9.0

> <https://github.com/elastic/elasticsearch/commit/65e2aa7c449519bb252e7c1f82228c5543191882>
>
> (cherry picked from commit bcc28e0ab8e6883e14b23f93f428dee03b377a1d)
> Signed-off…-by: Andrei Dan \<andrei.dan@elastic.co\>

---

<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:** [September 3, 2022, 3:18pm UTC](https://discuss.elastic.co/t/manage-index-templates-privilege-not-work-in-component-template-api/311029/3 "2022-09-03T15:18:31Z")

</div>

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