# Elastic apm tenancy - How it works?

**URL:** <https://discuss.elastic.co/t/elastic-apm-tenancy-how-it-works/347555>\
**Category:** APM\
**Tags:** docker, java, ui\
**Created:** [November 20, 2023, 9:22pm UTC](https://discuss.elastic.co/t/elastic-apm-tenancy-how-it-works/347555 "2023-11-20T21:22:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![miguel.longo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miguel.longo/32/119522_2.png) [@miguel.longo](https://discuss.elastic.co/u/miguel.longo)\
**Post date:** [November 20, 2023, 9:22pm UTC](https://discuss.elastic.co/t/elastic-apm-tenancy-how-it-works/347555/1 "2023-11-20T21:22:35Z")

</div>

**Kibana version** : 8.6.2

**Elasticsearch version** : 8.6.2

**APM Server version** : 8.6.2

**APM Agent language and version** : Java elastic-apm-agent.jar:1.43.0

I need help to understand how tenancy works in the elasticsearch, kibana and apm stack.

I started by creating aliases in elasticsearch by filtering for a specific label. Then, I created a role where each role allows access to a specific space in kibana.

In this space, within observability, I edited the APM settings to use the aliases I created. Each space has it's aliases.

Logging in with the user with applied the role in kibana, the segmentation works, the user only sees services, transactions, spans and logs according to the alias filter. However, it cannot list all dependencies related to the alias. If I open a transaction, like a database query, I can see the dependecy in span details and if I open it on discovery, I can see the labels in it.

How can I list the dependencies? What could be wrong?

Below is the applied alias:

```auto
POST /_aliases?pretty
{
  "actions": [
    {
      "add": {
        "index": "traces-apm*",
        "alias": "teamA-traces-apm",
        "filter": {
          "term": {
            "labels.team": "teamA"
          }
        }
      }
    },
    {
      "add": {
        "index": "logs-apm*",
        "alias": "teamA-logs-apm",
        "filter": {
          "term": {
            "labels.team": "teamA"
          }
        }
      }
    },
    {
      "add": {
        "index": "metrics-apm*",
        "alias": "teamA-metrics-apm",
        "filter": {
          "term": {
            "labels.team": "teamA"
          }
        }
      }
    }
  ]
}

```

Thanks guys!

---

<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 18, 2023, 9:23pm UTC](https://discuss.elastic.co/t/elastic-apm-tenancy-how-it-works/347555/2 "2023-12-18T21:23:09Z")

</div>

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