SharePoint : OOTB feature to display the list of sites that the current user has access
Recently there was a request from a user to display the list of sites where the user has access rights. It took a while to figure out how to get it work. Here is how it was done :
Add Search core results webpart.
To display the all the sites that the current user has access :
In the results query option -> Fixed Keyword Query add the following :
contentclass:STS_Site
contentclass:STS_Site NOT (path:http://yoursite1/* AND path:http://yoursite2/*)
To display specific sites if the user has access :
contentclass:STS_Site AND (path:http://yoursite1/* OR path:http://yoursite2/*)
Knowledge is for sharing.. Keep sharing.. and keep growing
Comments
Post a Comment