4

In AD we have two entries for users if they have a mobile number.

John Smith John Smith (Mobile)

This is because our phone system can only display one number per entry and is hooked into AD. This I can not change.

The problem I am having is that these users are appearing in the People Search results. I want to exclude them. Ideally I would do this by excluding any users with (Mobile).

Users are also appearing in other AD lists so removing it from there as well would be useful but I could live without it.

4 Answers 4

6

This can be achieved by using Search Scopes.

  1. You will have to create a custom search scope (Eg:"People Search") in Search settings of the site.

  2. Add a rule for the scope and select Property Query as the scope rule type.

  3. If you have an AD property that is set for users coming from the phone system, select that property and select the value that is brought from the phone system. (If you dont have a property added in the scope, go to CA, Metadata properties -> UserName -> Edit/Map Property. Click the Allow this property to be used in scopes checkbox in the Use in scopes section.)

  4. Select the behaviour for the rule as 'Exclude'.

  5. Add this scope into the default scopes dropdown for search.

  6. You may need to wait a few minutes for the scope change to update the search results.

2

Central Administration > Application Management > Manage service applications > User Profile Service Application > Synchronization > Configure Synchronization Connections

Click on your connection, Edit Connection Filters.

Here you can exclude users.

http://www.harbar.net/archive/2011/02/22/323.aspx contains some more details of how to exclude disabled accounts etc.

By excluding the accounts user profiles are not created and therefore are not indexed so do not appear in the search results

1
  • I followed this documentation and Disable Users / Service accounts are still displaying (Even after a full sync). Any suggestions? Commented Jun 2, 2014 at 22:56
0

If I delete the user profile in Central Admin then the users do not appear in the search results. Running a Full AD sync brings them back. Would need to write a powershell script to delete the uneeded user provildes and run this after each pull.

0

We had a similar case on Sharepoint 2013 where a customer put forth a privacy requirement:

  • all domain users are allowed to log in
  • some users should not be searchable

In order to comply to the privacy requirements all users are by default non-searchable and must explicitly be marked as searchable. The customer had set up for this purpose a custom field (a boolean flag) into the AD.

What we ended up doing was a scheduled Powershell script that queries the AD and sets according to the mentioned custom field a Sharepoint user profile property. Then into the people search we added a condition that the person must be marked as searchable.

HTH someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.