# How to add new tenant for a role

**URL:** <https://forum.opensearch.org/t/how-to-add-new-tenant-for-a-role/23035>\
**Category:** Security\
**Created:** [January 8, 2025, 10:08am UTC](https://forum.opensearch.org/t/how-to-add-new-tenant-for-a-role/23035 "2025-01-08T10:08:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sayalipatil9689](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@sayalipatil9689](https://forum.opensearch.org/u/sayalipatil9689)\
**Post date:** [January 8, 2025, 10:08am UTC](https://forum.opensearch.org/t/how-to-add-new-tenant-for-a-role/23035/1 "2025-01-08T10:08:59Z")

</div>

Hi,

I have created a role as below using roles.yml. This role has given kibana\_read\_only access from roles\_mapping.yml.

```auto
reader:
  reserved: false
  hidden: false
  cluster_permissions:
  - cluster_composite_ops_ro
  - 'cluster:admin/opensearch/ql/datasources/read'
  index_permissions:
  - index_patterns:
        - "index1"
    dls: ""
    allowed_actions:
      - 'indices:admin/resolve/index'
      - 'indices:data/read/field_caps'
      - 'indices:data/read/search'
      - 'indices:data/read/get'
      - 'indices:admin/mappings/get'
      - 'indices:monitor/settings/get'
      - 'indices:admin/aliases/get'
      - 'indices:data/read/search*'
      - 'search'
      - 'read'
  - index_patterns:
        - ".kibana*"
    allowed_actions:
      - 'indices:data/read/search'
      - 'indices:data/write/update'
      - 'indices:data/write/index'
      - 'indices:data/write/bulk'
      - 'indices:data/read/get'
      - 'indices:data/read/mget[shard]'
  tenant_permissions:
    - tenant_patterns:
        - "test_tenant"
      allowed_actions:
        - 'read'
        - 'write'
  static: false

```

I am trying to add test\_tenant tenant for it. But it is giving me an error “Application Not Found” when I try to access Dashboards by switching to test\_tenant.

How to resolve it?

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [January 8, 2025, 11:14am UTC](https://forum.opensearch.org/t/how-to-add-new-tenant-for-a-role/23035/2 "2025-01-08T11:14:37Z")

</div>

Hi @sayalipatil9689. What’s the OpenSearch version?

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [January 8, 2025, 11:30am UTC](https://forum.opensearch.org/t/how-to-add-new-tenant-for-a-role/23035/3 "2025-01-08T11:30:39Z")

</div>

@sayalipatil9689 Could you also run the below command and share the output? It will provide all the mappings of the reported user.

```auto
curl --insecure -u <username>:<password> https://<OpenSearch_node_IP_or_FQDN>:9200/_plugins/_security/authinfo?pretty

```

---

<div class="post-metadata">

**Author:** ![sayalipatil9689](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@sayalipatil9689](https://forum.opensearch.org/u/sayalipatil9689)\
**Post date:** [January 21, 2025, 6:30am UTC](https://forum.opensearch.org/t/how-to-add-new-tenant-for-a-role/23035/4 "2025-01-21T06:30:58Z")

</div>

I restarted the server and It got resolved.
