SharePoint 2013 KQL for Sites User has Access

Problem: You want a webpage on your SharePoint intranet that lists only the sites the logged-in user has permissions to access.

Solution: Create a page, insert a search results webpart with a query that uses KQL.  The notes for each KQL statement were key to getting the results to show as desired.

  • KQL for websites = ContentClass:STS_Web
    note: this will return SharePoint sub-sites so they show independent of their parent sites
  • KQL for site collections = ContentClass:STS_Site
    note: this will return only the root SharePoint sites
Posted in KQL

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s