# Filter Report by Authenticated User

**URL:** <https://discuss.elastic.co/t/filter-report-by-authenticated-user/136355>\
**Category:** Elasticsearch\
**Created:** [June 18, 2018, 6:08pm UTC](https://discuss.elastic.co/t/filter-report-by-authenticated-user/136355 "2018-06-18T18:08:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulo.leao](https://avatars.discourse-cdn.com/v4/letter/p/ce7236/32.png) [@paulo.leao](https://discuss.elastic.co/u/paulo.leao)\
**Post date:** [June 18, 2018, 6:08pm UTC](https://discuss.elastic.co/t/filter-report-by-authenticated-user/136355/1 "2018-06-18T18:08:16Z")

</div>

Hi,

I created an index that ingests files information from our Windows File Server, and I want to share a report with our users. The challenge of sharing this report is to make sure user can see only the files they own or have read/write permission. My index contains a field called username that includes the domain name like this: %domain%%username%.

Also I know that I can retrieve the authenticated user information using the x-Pack Authenticate API.

GET \_xpack/security/\_authenticate

{  
"username": "domain\username",  
"roles": [  
"admins",  
"superuser"  
],  
"full\_name": null,  
"email": null,  
"metadata": {  
"ldap\_dn": "...,  
"ldap\_groups": [  
...  
},  
"enabled": true  
}

So my question is: Can I filter my report based on the authenticated user information?

Thank you.

---

<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:** [July 16, 2018, 6:08pm UTC](https://discuss.elastic.co/t/filter-report-by-authenticated-user/136355/2 "2018-07-16T18:08:27Z")

</div>

Closed on July 16, 2018, 6:08pm UTC

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