0

I am trying to display the user's location via Azure AD profile in the Pnp Search Results, however it is always returning empty.

AD User Details

enter image description here enter image description here


Managed properties in SharePoint Admin

enter image description here


SharePoint Search Query Tool results

I see that the 3 "Office" fields are displaying correctly, hence I believe it implies the properties have been properly crawled.

enter image description here


PNP Search Results settings

Layout Slot Settings

enter image description here

Handlebars Expression in Field Settings.

All these fields will return nothing

{{slot item @root.slots.OfficeLocation}} {{slot item @root.slots.OfficeNumber}} {{slot item @root.slots.Office}}
2
  • Have you selected these properties in search result web part "Select Properties" drop down? Mar 20 at 5:45
  • @KalpeshVaghela Right that seemed to work now. It wasn't available as one of the dropdown options so I thought I need not set it. This field does not appear in the "Search Filter" though. Any idea what could be missing? Mar 20 at 5:50

1 Answer 1

1

You need to select managed properties under "Select Properties".

For refiners, you are not seeing this in the selection because those are not refinable properties

enter image description here

If you want to use it for refiner then you need to map your crawled properties to any RefinableString managed properties (as we can't create new managed properties with the "Refine" option to true in SharePoint Online)

enter image description here

You can map your crawled properties (e.g. People.Office, etc.) to existing RefinablableString managed properties. Make sure that you also select this RefinableString properties to "Select Properties" in search result web part. and then wait for next crawl cycle (you can except three two to four hours generally) and then those properties will be available in Filter web part as well.

3
  • Thank you @Kalpesh! Mar 20 at 6:47
  • I have defined RefinableString to People:Office and waited for almost 1 week for the crawl. There are some data showing up on the Filters already but it's not accurate. Is there a way to view the status of the crawl?
    – Denisse
    Mar 28 at 3:27
  • As per my knowledge there is no way to check this status. Mar 28 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.