Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
add comment

3 Answers 3

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment
up vote 0 down vote accepted

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

share|improve this answer
    
I followed this documentation and Disable Users / Service accounts are still displaying (Even after a full sync). Any suggestions? –  Colbs Jun 2 at 22:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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