Forum Discussion
john_west3
Aug 06, 2024Copper Contributor
People search results excluding external/guest users
I would like to exclude/hide external/guest users in the people search in our SharePoint intranet site. In SharePoint admin centre created a new search "local people search2" which excludes externa...
DaveMehr365
Aug 19, 2024MVP
Hello john_west3
use the PnP Modern Search WebParts for modern Search in M365 https://microsoft-search.github.io/pnp-modern-search/scenarios/Create-a-useful-People-Search/
You don't need a specific result source, you can exclude the external users direct in your query.
Best, Dave
- john_west3Aug 27, 2024Copper Contributor
Thank you, do you know how to set the filtering to use the "company" field which is in Active directory? I cannot find it in the fields section, but we use it in our AD to list which division the staff are in? I have been able to use the department, keywords and job-title fields to filter but would also like to be able to filter by "company" too?
Thanks for your help
- john_west3Aug 23, 2024Copper ContributorThank you, its a shame I could not work out how to resolve current method.. but will look into this way