# Create user with multiple roles(of different spaces) and having access to only single space

**URL:** <https://discuss.elastic.co/t/create-user-with-multiple-roles-of-different-spaces-and-having-access-to-only-single-space/284591>\
**Category:** Kibana\
**Tags:** elastic-stack-security\
**Created:** [September 20, 2021, 5:37am UTC](https://discuss.elastic.co/t/create-user-with-multiple-roles-of-different-spaces-and-having-access-to-only-single-space/284591 "2021-09-20T05:37:58Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![srinielk](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@srinielk](https://discuss.elastic.co/u/srinielk)\
**Post date:** [September 20, 2021, 5:37am UTC](https://discuss.elastic.co/t/create-user-with-multiple-roles-of-different-spaces-and-having-access-to-only-single-space/284591/1 "2021-09-20T05:37:58Z")

</div>

please advise how to create user with multiple roles(of different spaces) and having access to only single space

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [September 20, 2021, 10:13am UTC](https://discuss.elastic.co/t/create-user-with-multiple-roles-of-different-spaces-and-having-access-to-only-single-space/284591/2 "2021-09-20T10:13:37Z")

</div>

Hi @srinielk ,

welcome to the Kibana community.

From what I currently understand you have a user with multiple roles for different spaces (so probably has access to some of these spaces), but you want to reduce this to only a single space. Can you confirm that is what you meant, or clarify the question?

Also, what version of the stack are you using?

---

<div class="post-metadata">

**Author:** ![srinielk](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@srinielk](https://discuss.elastic.co/u/srinielk)\
**Post date:** [September 20, 2021, 2:21pm UTC](https://discuss.elastic.co/t/create-user-with-multiple-roles-of-different-spaces-and-having-access-to-only-single-space/284591/3 "2021-09-20T14:21:58Z")

</div>

Hi Marco,

Thanks for the response. We are using Stack Management 7.13.0 version.

Requirement:  
We have created separate space in Kibana for each organization/business group. So we have multiples spaces overall and there are multiple users for each business group.  
For some users, we should create account in such a away that the user should have access to the space (belongs to his own business group) and also indexes of other space (but not space access).

Example: If there are two spaces space1 and space2, each space have indexes.  
User A should be provided with space1 access along with space1 indexes access and space 2 indexes access but not space2 access.  
So when he login to Kibana he should see space1, corresponding indexes and indexes of space2.

Hope requirement is clear to you 🙂 Please advise.

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [September 21, 2021, 3:27pm UTC](https://discuss.elastic.co/t/create-user-with-multiple-roles-of-different-spaces-and-having-access-to-only-single-space/284591/4 "2021-09-21T15:27:35Z")

</div>

When creating roles you can specify in different sections which ES index privileges and Kibana space privileges.

In the example below I have 2 spaces: `Default` with only the logs sample data index and `OtherSpace` with only the flights sample data index.  
But in the Kibana section I'll give only `OtherSpace` privileges.

 ![Screenshot 2021-09-21 at 17.24.02](https://us1.discourse-cdn.com/elastic/original/3X/c/1/c10966e5e7bec691b87c97d5de48d2aad99605ad.png)

(I found that, even as admin, I had to access first from one space, then to another, in order to add both indexes.)  
The user will be able to access both indexes, probably creating (a) new indexpattern(s), and access them.  
Does it help?

---

<div class="post-metadata">

**Author:** ![srinielk](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@srinielk](https://discuss.elastic.co/u/srinielk)\
**Post date:** [September 22, 2021, 8:04am UTC](https://discuss.elastic.co/t/create-user-with-multiple-roles-of-different-spaces-and-having-access-to-only-single-space/284591/5 "2021-09-22T08:04:38Z")

</div>

HI Marco,

Thanks for response with solution.

Unfortunately the indices created for other space are not visible in current space under Index privileges while creating a role. Not sure if any restrictions on this.  
Please advise if we can fix this.

Thanks and Regards,  
Srinivas

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [September 22, 2021, 8:24am UTC](https://discuss.elastic.co/t/create-user-with-multiple-roles-of-different-spaces-and-having-access-to-only-single-space/284591/6 "2021-09-22T08:24:25Z")

</div>

> [@srinielk](#):
>
> Unfortunately the indices created for other space are not visible in current space under Index privileges while creating a role. Not sure if any restrictions on this.

I found this issue too while reproducing the scenario.  
I had to create the role in one space, save it, then change to all the other spaces and add the new indexes one by one (remember to save every time).

---

<div class="post-metadata">

**Author:** ![srinielk](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@srinielk](https://discuss.elastic.co/u/srinielk)\
**Post date:** [September 22, 2021, 8:44am UTC](https://discuss.elastic.co/t/create-user-with-multiple-roles-of-different-spaces-and-having-access-to-only-single-space/284591/7 "2021-09-22T08:44:10Z")

</div>

yeah, in any case we cannot add indices other space to the role on current space right? not working for me. Created same way as you suggested.

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [September 22, 2021, 8:47am UTC](https://discuss.elastic.co/t/create-user-with-multiple-roles-of-different-spaces-and-having-access-to-only-single-space/284591/8 "2021-09-22T08:47:21Z")

</div>

The role has to be edited in _each_ Space, adding the index within the space you have access to.

---

<div class="post-metadata">

**Author:** ![srinielk](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@srinielk](https://discuss.elastic.co/u/srinielk)\
**Post date:** [October 4, 2021, 10:47am UTC](https://discuss.elastic.co/t/create-user-with-multiple-roles-of-different-spaces-and-having-access-to-only-single-space/284591/9 "2021-10-04T10:47:00Z")

</div>

Hi Marco,

Tried this option as well but not helped.

Thanks,  
Srinivas

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [October 4, 2021, 10:50am UTC](https://discuss.elastic.co/t/create-user-with-multiple-roles-of-different-spaces-and-having-access-to-only-single-space/284591/10 "2021-10-04T10:50:22Z")

</div>

What problem did you face after configuring all fields with permissions for each space/user?

---

<div class="post-metadata">

**Author:** ![srinielk](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@srinielk](https://discuss.elastic.co/u/srinielk)\
**Post date:** [October 8, 2021, 12:20pm UTC](https://discuss.elastic.co/t/create-user-with-multiple-roles-of-different-spaces-and-having-access-to-only-single-space/284591/11 "2021-10-08T12:20:56Z")

</div>

edited in _each_ Space by adding the index within the space I have access to but the user is able to access only the indices where he has access to particular space.

Regards,  
Srinivas

---

<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 5, 2021, 12:21pm UTC](https://discuss.elastic.co/t/create-user-with-multiple-roles-of-different-spaces-and-having-access-to-only-single-space/284591/12 "2021-11-05T12:21:12Z")

</div>

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