sp-dev-fx-webparts
sp-dev-fx-webparts copied to clipboard
Filter users based on AD attribute
Disclaimer
Yes
Sample
https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-directory
Contributor(s)
@joaomendes
Question
We have an AD attribute JobTitle to exclude users from appearing in search results, how do i use this attribute to exclude users that shouldn't appear in React People directory webpart results.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
You can't using the "React Directory" as -is condition.
You can, if you go with PnP Modern Search
1st: By design, it's using SharePoint User Profile services and properties and not all properties are synced straight from AD properties. 2nd: It's limited to the following specific properties in SharePoint User profile service : It's inclusive and not exclusive!
``["FirstName", "LastName", "PreferredName", "WorkEmail", "OfficeNumber", "PictureURL", "WorkPhone", "MobilePhone", "JobTitle", "Department", "Skills", "PastProjects", "BaseOfficeLocation", "SPS-UserType", "GroupId"];`