# Unauthorized elastic-stack-apm-apm-user user failed to index document metrics-apm indices

**URL:** https://discuss.elastic.co/t/unauthorized-elastic-stack-apm-apm-user-user-failed-to-index-document-metrics-apm-indices/344765
**Category:** APM
**Tags:** server
**Created:** [October 10, 2023, 9:37pm UTC](https://discuss.elastic.co/t/unauthorized-elastic-stack-apm-apm-user-user-failed-to-index-document-metrics-apm-indices/344765 "2023-10-10T21:37:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![FASUGBA\_boluwatife](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fasugba_boluwatife/32/79258_2.png) [@FASUGBA\_boluwatife](https://discuss.elastic.co/u/FASUGBA_boluwatife)
#### Post date: [October 10, 2023, 9:37pm UTC](https://discuss.elastic.co/t/unauthorized-elastic-stack-apm-apm-user-user-failed-to-index-document-metrics-apm-indices/344765/1 "2023-10-10T21:37:16Z")

</div>

I upgraded APM-server from 7.17 to 8.10.3 image. Since the upgrade, I am getting error

```auto
 {"log.level":"error","@timestamp":"2023-10-10T21:34:47.374Z","log.origin":{"file.name":"go-docappender@v0.2.1-0.20230724080315-b714d6181871/appender.go","file.line":325},"message":"failed to index document in 'metrics-apm.app.silicon_edge_cache_refresher-default' (security_exception): action [indices:admin/auto_create] is unauthorized for user [elastic-stack-apm-apm-user] with effective roles [apm_system,eck_apm_user_role_v75,ingest_admin] on indices [metrics-apm.app.silicon_edge_cache_refresher-default], this action is granted by the index privileges [auto_configure,create_index,manage,all]","service.name":"apm-server","ecs.version":"1.6.0"}
   {"log.level":"error","@timestamp":"2023-10-10T21:34:47.374Z","log.origin":{"file.name":"go-docappender@v0.2.1-0.20230724080315-b714d6181871/appender.go","file.line":325},"message":"failed to index document in 'metrics-apm.app.silicon_edge_cache_refresher-default' (security_exception): action [indices:admin/auto_create] is unauthorized for user [elastic-stack-apm-apm-user] with effective roles [apm_system,eck_apm_user_role_v75,ingest_admin] on indices [metrics-apm.app.silicon_edge_cache_refresher-default], this action is granted by the index privileges [auto_configure,create_index,manage,all]","service.name":"apm-server","ecs.version":"1.6.0"}

```

Can anyone advice on how to solve this?

---

<div class="post-metadata">

### Author: ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)
#### Post date: [October 18, 2023, 8:52am UTC](https://discuss.elastic.co/t/unauthorized-elastic-stack-apm-apm-user-user-failed-to-index-document-metrics-apm-indices/344765/2 "2023-10-18T08:52:17Z")

</div>

The configured user seems to be missing the privilege `indices:admin/auto_create` . The error should resolve once the user is granted this privilege.

---

<div class="post-metadata">

### Author: ![FASUGBA\_boluwatife](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fasugba_boluwatife/32/79258_2.png) [@FASUGBA\_boluwatife](https://discuss.elastic.co/u/FASUGBA_boluwatife)
#### Post date: [October 18, 2023, 11:57pm UTC](https://discuss.elastic.co/t/unauthorized-elastic-stack-apm-apm-user-user-failed-to-index-document-metrics-apm-indices/344765/3 "2023-10-18T23:57:10Z")

</div>

Updating my CRDs fixed the issue for me. 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: [November 15, 2023, 11:57pm UTC](https://discuss.elastic.co/t/unauthorized-elastic-stack-apm-apm-user-user-failed-to-index-document-metrics-apm-indices/344765/4 "2023-11-15T23:57:28Z")

</div>

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