Tuesday 20 March 2018

Enable Anonymous access to search results.

I am working on one task to display list items using a display template to anonymous users. I have also made the managed search property safe for the anonymous user, but it is still not working for the anonymous user.

Out-of-the-box, the search results webpart (via display template) will try to display data to users (anonymous and authenticated users); authenticated users will see results, while anonymous users will see no results.

Here I will use the PowerShell script to allow list-level anonymous access.



The commented AnonymousPermMask property, according to MSDN, is deprecated and you need to use AnonymousPermMask64.



Instead of ViewFormPages, we need to use AnonymousSearchAccessList, which is described as "Make content of a list or document library retrieveable for anonymous users through SharePoint search. The list permissions in the site do not change".

Then run a full search crawl.


🚀 "Happy Coding" 🚀