# Restricting users to only see data that has been captured about themselves

**URL:** <https://discuss.elastic.co/t/restricting-users-to-only-see-data-that-has-been-captured-about-themselves/302985>\
**Category:** Kibana\
**Created:** [April 22, 2022, 6:51am UTC](https://discuss.elastic.co/t/restricting-users-to-only-see-data-that-has-been-captured-about-themselves/302985 "2022-04-22T06:51:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt.Wash](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@Matt.Wash](https://discuss.elastic.co/u/Matt.Wash)\
**Post date:** [April 22, 2022, 6:51am UTC](https://discuss.elastic.co/t/restricting-users-to-only-see-data-that-has-been-captured-about-themselves/302985/1 "2022-04-22T06:51:03Z")

</div>

I would like to create a role that restricts users to only seeing data associated with them.

for example, I only want Jenny to see data associated with a field that is user.name = Jenny

Is this possible, as I would ideally like to apply this to 100's of users who can only view data that has been collected about themselves?

Thanks in advance,  
Matt

---

<div class="post-metadata">

**Author:** ![mikewillis](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mikewillis](https://discuss.elastic.co/u/mikewillis)\
**Post date:** [April 25, 2022, 12:30pm UTC](https://discuss.elastic.co/t/restricting-users-to-only-see-data-that-has-been-captured-about-themselves/302985/2 "2022-04-25T12:30:05Z")

</div>

Sounds like you maybe Document Level Security [Document level security | Elasticsearch Guide [8.1] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/document-level-security.html) will let you do what you want. Create a role which has permissions to documents where `user.name` has the value `Jenny` and assign Jenny's user to that role.

---

<div class="post-metadata">

**Author:** ![Matt.Wash](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@Matt.Wash](https://discuss.elastic.co/u/Matt.Wash)\
**Post date:** [April 29, 2022, 3:25am UTC](https://discuss.elastic.co/t/restricting-users-to-only-see-data-that-has-been-captured-about-themselves/302985/3 "2022-04-29T03:25:31Z")

</div>

this worked a treat. Many thanks @mikewillis

---

<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:** [May 27, 2022, 3:25am UTC](https://discuss.elastic.co/t/restricting-users-to-only-see-data-that-has-been-captured-about-themselves/302985/4 "2022-05-27T03:25:53Z")

</div>

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