Timeline for SharePoint Search Query - Filter item by user & groups from the current user
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 22, 2019 at 8:17 | vote | accept | KmDroid | ||
Oct 22, 2019 at 8:17 | comment | added | KmDroid | Ok, we will use Rest. Thank you! | |
Oct 21, 2019 at 18:19 | comment | added | Ben | Not that I know of. You can get the user login name from _spPageContextInfo, then search for them using " ... querytext='" + thatUserName + "'&sourceid='B09A7990-05EA-4AF9-81EF-EDFAB16C4E31' BUT I don't think you can get their groups that way. I only know of the REST approach. | |
Oct 21, 2019 at 17:20 | comment | added | KmDroid | Is it possible to only use SharePoint Search Query instead of SharePoint Rest API? | |
Oct 21, 2019 at 17:06 | comment | added | Ben | Add a script to the page (script editor web part works on SP Classic) to make a REST API call. This might help: sharepoint.stackexchange.com/questions/124909/…. After you know the groups, you either (a) use JS to hide/remove results from an OOTB search web part, or (b) use SharePoint's Search API filtered by RefinableString06, and then display your own results. I'd prefer (b) if possible--in the same script, output your results to the page. In SP Modern, I'd use an SPFx web part to issue the REST and Search queries and render the results. | |
Oct 21, 2019 at 16:44 | comment | added | KmDroid | Ok, I mapped my column named Users (users & groups) to RefinableString06, now If I use RefinableString06:{User.Name} is working cause my name was inserted in the column. But we have SharePoint groups that are mapped to azure ad groups and we are trying to use like RefinableString06:{User.Groups}, what can we use to see what groups we are a member of? | |
Oct 21, 2019 at 0:08 | history | answered | Ben | CC BY-SA 4.0 |