Targeting SharePoint search scopes to different audiences – Part 3

Part 3 – Adding tabs to Search Center

Following on from Part 2 this post in the series describes how to create the tabs and secure them to only be seen by certain users (In my case ‘sales’).

To create a tab there is quite a simple process and to do this all you need to do is edit a couple of lists stored in the search center called 'Tabs in Search Pages’ and ‘Tabs in Search Results’


Select the first list above and add a new item to the list.

Tabs in Search Pages


At this stage you need to remember the name of the page you created in Part 2 as you will need to enter this in the next screen.


Once you’ve entered the information correctly click save.

This is the crucial bit where we set the security on tab to targeted users. On the list where the item ‘Pauls blog’ appears select this item and from the ribbon click item permissions.


Remove permissions to all users and add the sales AD group.

Follow the same steps as Tabs for Search Pages above for Tabs for Search Results list.

Once you have followed the steps above you should now have a newly created targeted tab within your enterprise search center as shown below.

Tabs in Search Page


Tabs in Results Page


Real world examples

To put some real world on this the sort of scenarios this could apply to may be rolling out people finder (My Sites) to certain departments or searching of legacy systems to specific users.

It’s also worth noting that this is series of posts focuses on non SharePoint (anonymous) related content where security trimming results do not apply. If security m ay be an issue this needs to be considered as part of the design.


This scope is not necessarily 100% secure as you could drop a search web part into a site and narrow it down this way but to do this you would need site collection admin rights so the risk is minimal.

This blog does not focus on additional security trimming of content and without testing and design you may be providing users to unauthorised results so the advice here is use an account to access other systems with minimal rights. If you do need an elevated results pane why not create 2 scopes / results pages and use different crawl accounts providing access only to authorised users to the elevated results.

I hope this has been of use to you.

Targeting SharePoint search scopes to different audiences – Part 2

Part 2 – Creating Results Page

Continuing on from Part 1, Part 2 of the series focuses on creating the results page for use with the targeted audiences.

Within the enterprise search center create a new page from site actions on the ribbon and give it a name.


You’ll then be presented with a new results page which if your not used to may look a little daunting. From this page what we need to do is tailor the results web part to only display results for the newly created scope.

Locate the web part search core results shown below and select edit web part from the drop down.


On the right hand side you need to enter the scope exactly as you did for part 1, as this is a manual entry this can easily be entered incorrectly so pay special attention to this.


Click ok at the bottom of the properties noting that if the content source has completed results may not be displayed until the page is saved and reloaded PLEASE DONT SAVE THE PAGE YET THOUGH!

The next step I describe I didn't originally do and this caught me out as the tab I describe in a later part to the series kept reverting back to the default results page and the tab would highlight the wrong scope so a new search would search the wrong source!

Locate the web part search box and edit the web part properties. From here expand the section miscellaneous. Modify the search results page to be the name of the page you are in the middle of creating, this basically means that once a search is committed on this page the scope will remain on the same scope. In this case the scope is Pauls blog.


So at this stage the page is configured with the correct parameters however we're not quite finished yet, although at this stage you can now go ahead and save / publish the page. To secure who can see the page we need to edit permissions. Let’s assume we are going to show this to sales but restrict access to marketing. All we need to do is edit the permissions on the page as you would do with any other item in SharePoint you wish to secure.

So in my case I’m going to give all users part of the sales AD group access to the page. Navigate to the pages library via site settings -> view all site content –> pages. Select the newly created page and from the drop down select manage permissions.


From manage permissions select stop inheriting permissions.


Remove all the users you do not wish to view this results page / scope and add the sales AD group as readers. This now only allows sales users to be able to see the page.

Part 3 will discuss creating the tab that appear in the search center and aligning this to the newly created page described here.

Targeting SharePoint search scopes to different audiences – Part 1

Part 1 – Creating a Content Source and Scope

This blog post series details how to target search tabs in SharePoint enterprise search to specific groups of people. I have provided a guide as to how to set this up from start to finish.

The search tabs in SharePoint relate to pages where scopes can be defined for narrowing down results as shown below.


Firstly you need to create a content source for the scope to use of the site you wish to crawl / index. In my case this was a non SharePoint website. So for the purposes of the demo I’ll create a content source called ‘Pauls Blog’ and crawl


Once the content source is created run a full crawl and make sure that you successfully crawl by checking the crawl log.


Whilst the content source is crawling next thing to do is create a scope that contains the content source (make sure you compile the scope from search administration).

From the search navigation on the left hand select scopes under ‘Queries and Results’. From here click ‘New Scope’.


We’ll come back to the search results page later as this will need configuring. On the next page one thing that can trip you up assuming that you’ve created you’re scope and its ready. Before its ready to be used the scope needs two things – rules and compiling once the rules are in place. Firstly select ‘Add Rules’ which is where I will assign the content source created earlier to the scope.


On the next page simply select the content source option and pick Pauls Blog from the drop down and click ok.


Notice on the next page it will state the scope is not ready until the next scheduled compile which in this case is 8 minutes.


To speed up this process you can force an immediate update of the job by compiling scopes from the search administration home page. Simply select Start update now and this should compile your scope within a small space of time.


So now the scope should be available for use within the enterprise search site collection. In Part 2 I will discuss creating a separate results page that can be secured and targeted at specific individuals.