# Kibana User Session data in query

**URL:** <https://discuss.elastic.co/t/kibana-user-session-data-in-query/219635>\
**Category:** Kibana\
**Created:** [February 17, 2020, 2:04pm UTC](https://discuss.elastic.co/t/kibana-user-session-data-in-query/219635 "2020-02-17T14:04:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gkainth](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@gkainth](https://discuss.elastic.co/u/gkainth)\
**Post date:** [February 17, 2020, 2:04pm UTC](https://discuss.elastic.co/t/kibana-user-session-data-in-query/219635/1 "2020-02-17T14:04:59Z")

</div>

I have a question that I’m having trouble finding the answer to elsewhere.

I would like to create dashboards that customize the data based on the specific user logged in. To do so, I need to provide the logged-in user’s name/id to the underlying search query the dashboard is running.

How do I go about doing this?

---

<div class="post-metadata">

**Author:** ![Fabio-sama](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@Fabio-sama](https://discuss.elastic.co/u/Fabio-sama)\
**Post date:** [February 17, 2020, 3:48pm UTC](https://discuss.elastic.co/t/kibana-user-session-data-in-query/219635/2 "2020-02-17T15:48:48Z")

</div>

Hi there,

what do you mean with `customized data`? Different fields of the same documents or totally different documents?

Anyway, if you want to somehow have a way to differentiate what a given user (or better role) can see, buying the xpack license you'll unlock the access to specific fields or `read` access to specific documents.

---

<div class="post-metadata">

**Author:** ![gkainth](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@gkainth](https://discuss.elastic.co/u/gkainth)\
**Post date:** [February 17, 2020, 4:05pm UTC](https://discuss.elastic.co/t/kibana-user-session-data-in-query/219635/3 "2020-02-17T16:05:08Z")

</div>

I have xpack, but the role constraints don't help. I don't want to create a role per user. I need to join the data in my index to only return documents matching the current user logged in.

e.g something like - document.user : $currentSessionUser

---

<div class="post-metadata">

**Author:** ![Fabio-sama](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@Fabio-sama](https://discuss.elastic.co/u/Fabio-sama)\
**Post date:** [February 18, 2020, 8:02am UTC](https://discuss.elastic.co/t/kibana-user-session-data-in-query/219635/4 "2020-02-18T08:02:43Z")

</div>

Mhmh I don't think you can do that, to be honest.

Anyway, if you have the xpack you can ask the Support and be sure of it.

---

<div class="post-metadata">

**Author:** ![Gangesh](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@Gangesh](https://discuss.elastic.co/u/Gangesh)\
**Post date:** [February 18, 2020, 8:43am UTC](https://discuss.elastic.co/t/kibana-user-session-data-in-query/219635/5 "2020-02-18T08:43:37Z")

</div>

Thanks @Fabio,  
If you have any support link please provide me. where i can get help and ask question.

---

<div class="post-metadata">

**Author:** ![Fabio-sama](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@Fabio-sama](https://discuss.elastic.co/u/Fabio-sama)\
**Post date:** [February 18, 2020, 8:51am UTC](https://discuss.elastic.co/t/kibana-user-session-data-in-query/219635/6 "2020-02-18T08:51:12Z")

</div>

If you have a valid xpack license you should be able to access [this](https://support.elastic.co/) and proceed with the support request.

---

<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:** [March 17, 2020, 8:51am UTC](https://discuss.elastic.co/t/kibana-user-session-data-in-query/219635/7 "2020-03-17T08:51:13Z")

</div>

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