How can we refine documents shown in SharePoint Search, by documents that are shared with me so that whenever any user open the search page, he only sees documents that are shared with him.
1 Answer
When the document shared with a user, the user will have permission to this document.
Since the Enterprise Search has Security Trimming feature which we can only view the results we have permission, the Content Search web part will only return the results which shared with the users. You don’t need to configure any other query text. Just like below:
path:"http://sp/LibraryName" (IsDocument:"True" OR contentclass:"STS_ListItem")
-
But this will also show the document that are created by the user since he has permissions on them. I want to explicitly show only the document shared with him. May be we can use Search Refiners, I am not sure.– FarhanCommented Jan 29, 2018 at 9:51
SharedWithUsersOWSUSER:{UserAccountName} AND contentclass:STS_ListItem_MySiteDocumentLibrary