Forum Discussion

EMIL_K_DIT's avatar
EMIL_K_DIT
Brass Contributor
Sep 07, 2022
Solved

PNP Modern Search People - Show Department/Office as filter

Hi all, 

We're using the PnP Modern Search, and I can't for the life of me get Department to show as a filter. 

I have tried adding ows_Department, Department, BaseOfficeLocation, anything really to filters, and it just wont get through.. 

Also tried adding ows_Department as Refinablestring02, but still no luck. My users do have an attribute but I can't for the life of me target it. If I go to Sharepoint > Search > People > Type in any location they do appear as I'd like them. 

How do I find out which attribute is presented as Department in my tenant? 


 

 

  • EMIL_K_DIT 

     

    For that managed property is the OfficeNumber If you want to get only value but you can't use it for refiners.

     

     

    You have to map "People:Office" crawled property to any RefinableString*** managed property and then you could use it in refiners.

     

    Important: It might take some time to fill RefinableString managed property which you use for existing user profile (According to my past experience it took 2 days !!!).

     


    Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community

15 Replies

  • EMIL_K_DIT 

     

    You can try below default Managed Properties which worked fine for me

     

     

     

    It will show values from below mentioned OOTB user profile properties so make sure these property contains values.

     

     

     

     

    Another thing, above mentioned property would not able available as suggestion in Filter Field drop down but as it's combo box still you can enter it manually as shown below

     

     

    Below is the output of search result

     

     

     


    Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community

    • EMIL_K_DIT's avatar
      EMIL_K_DIT
      Brass Contributor

      kalpeshvaghela Thanks for your reply! Yes I have tried these but will give it another spin.  

      Where is this screenshot from? I can't seem to find a similar one in my console. 

      • kalpeshvaghela's avatar
        kalpeshvaghela
        Steel Contributor

        EMIL_K_DIT 

         

        Screen shot is from SharePoint User Profile and follow below steps to open it

         

        Open your SharePoint Admin Center using URL https://{TenantName}-Admin.SharePoint.com

         

        Go to More Feature and Click on User Profile

         

        Click and User Profile and Search for any user 

         

        Click on Edit Profile Property and the screen shot which I shared it taken from here.