Pnp-modern-search: Support for audience

Created on 19 Oct 2020  路  2Comments  路  Source: microsoft-search/pnp-modern-search

Get the ability to filter results based on current user audience membership.

Thanks

Most helpful comment

Thanks! I was not aware of User.audiences and the other managed properties.
Just found Microsoft reference: https://docs.microsoft.com/en-us/sharepoint/technical-reference/query-variables

All 2 comments

You can do this manually via KQL similar to what the HCWP adds:

(ModernAudienceAadObjectIds:{User.Audiences} OR NOT IsAudienceTargeted:true)

Thanks! I was not aware of User.audiences and the other managed properties.
Just found Microsoft reference: https://docs.microsoft.com/en-us/sharepoint/technical-reference/query-variables

Was this page helpful?
0 / 5 - 0 ratings