SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've created connection filters that should filter out any service accounts from being imported from AD. It's worked for all service accounts except for the Sharepoint search and Sharepoint service accounts. I've created a basic search site that appends contentclass:spspeople to queries in order to make a corporate directory. Is there some way that I can modify that search? I've tried everything else that I could find in google results including: creating a new user property and managed property then creating an exclude rule for the managed property on the People scope, connection filters, and I've excluded the OU that contains these service accounts from profile synchronization. Nothing has worked.

share|improve this question
Why are you trying to filter out service accounts? Any user can discover them via ADUC/LDP/etc. unless you have removed the ACL that is present on OUs by default. – Trevor Seward May 4 '13 at 3:15

Probably because you used Google, if you use Bing (:-)) you'll find references to Keyword Query Language, KQL. (You did not mention the SharePoint version but KQL is supported in 2010 and 2013) You can append an exclusion for those accounts like "and (-AccountName:srv_sp_farm -AccountName:srv_sp_crawl)" You can play with it in your search center and then apply what works to your directory.

One Question though, why not just use the People Search page rather than reinvent the wheel?

share|improve this answer

Your Answer


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.