I am working with SharePoint 2013 People search and I need to be able to exclude all the inactive accounts. Has anyone else ever done this and if so then please provide guidance and configuration\code examples.



  • You should exclude the inactive accounts from the AD Sync, then search will only find active user profiles. Search is simply discovering the profiles in the UPSA. Fix your import and Search will work the way you want. Commented Oct 12, 2017 at 10:33
  • I know that's correct, but in this situation the customer wants to keep the inactive accounts in SharePoint. Commented Oct 12, 2017 at 15:11
  • Do they even understand what that means? It's not like the UAL won't reflect those users. Commented Oct 13, 2017 at 13:23

1 Answer 1


I have been searching for a solution to this problem for a very long time, however, I was not able to successfully exclude inactive accounts. There is no property which defines the status.

Another approach: You can use for example the department property and filter on that. One con of this approach is that you need to empty the department field and block a user account when a user leaves the company.

When using AD Sync you can also define a custom property, however, this property also needs to be changed, just as with the department property.

  • I will definitely try that. Commented Oct 12, 2017 at 15:12

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.