Exclude service accounts from the people finder (search)
-
06-10-2020 - |
Question
I have a People Finder page which uses the Search Results webpart, I'm wanting to exclude all service accounts from the search results, how can I achieve this without manually inputting all the accounts into the search query ({searchboxquery} -0182 –SA0092 –SA0036 etc).
*I'm not very experienced with search, so you may have to simplify your answer slightly.
Solution
My colleague and I found a solution to our problem:
In the 'Search Results' webpart > 'Change Query' > in the 'Query Text' box add {searchboxquery} -Firstname="0*" -Firstname="SA0*"> OK
*Our service accounts all began with a 0 or SA0.
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange