# Elastic Agent Configured By Fleet - Integrations Using MetricBeat - this action is granted by the index privileges error

**URL:** <https://discuss.elastic.co/t/elastic-agent-configured-by-fleet-integrations-using-metricbeat-this-action-is-granted-by-the-index-privileges-error/314603>\
**Category:** Beats\
**Tags:** docker, metricbeat\
**Created:** [September 16, 2022, 9:15pm UTC](https://discuss.elastic.co/t/elastic-agent-configured-by-fleet-integrations-using-metricbeat-this-action-is-granted-by-the-index-privileges-error/314603 "2022-09-16T21:15:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnimon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dnimon/32/110959_2.png) [@dnimon](https://discuss.elastic.co/u/dnimon)\
**Post date:** [September 16, 2022, 9:15pm UTC](https://discuss.elastic.co/t/elastic-agent-configured-by-fleet-integrations-using-metricbeat-this-action-is-granted-by-the-index-privileges-error/314603/1 "2022-09-16T21:15:20Z")

</div>

I am running into an issue when trying to use Elastic Fleet and the elastic agents. I am using 8.4.1 for all parts (kibana, elastic, elastic-agent).

I was able to setup a elastic-agent on the elastic/kibana server to serve as the fleet server. Then I installed the elastic agent on one of my different servers and was able to get it to show as healthy and reporting in. I am not receiving any logs or metrics though. I installed the integrations for docker and elastic agent, so I should be receiving something.

I noticed in the state/data/logs/default/metricbeat-20220916 the agent is attempting to talk to the elastic server, but getting authentication errors like this:

```auto
{"log.level":"error","@timestamp":"2022-09-16T21:01:42.376Z","log.logger":"publisher_pipeline_output","log.origin":{"file.name":"pipelin
e/client_worker.go","file.line":150},"message":"Failed to connect to backoff(elasticsearch(SERVER_ADDRESS_HERE)): 4
03 Forbidden: {\"error\":{\"root_cause\":[{\"type\":\"security_exception\",\"reason\":\"action [indices:admin/get] is unauthorized for A
PI key id [Zx4OSIMB9E5jy0DuiBc3] of user [elastic/fleet-server], this action is granted by the index privileges [view_index_metadata,man
age,all]\"}],\"type\":\"security_exception\",\"reason\":\"action [indices:admin/get] is unauthorized for API key id [Zx4OSIMB9E5jy0DuiBc
3] of user [elastic/fleet-server], this action is granted by the index privileges [view_index_metadata,manage,all]\"},\"status\":403}","
service.name":"metricbeat","ecs.version":"1.6.0"}

```

For the setup, I only used the kibana web interface to setup the fleet server and adding the integrations to the agent.

---

<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 14, 2022, 11:16pm UTC](https://discuss.elastic.co/t/elastic-agent-configured-by-fleet-integrations-using-metricbeat-this-action-is-granted-by-the-index-privileges-error/314603/2 "2022-10-14T23:16:20Z")

</div>

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