Filter disabled user accounts from AD to SharePoint


How often do you see that disabled users from active directory appears in SharePoint.

There are scenarios you might observe disable person's details will appears in SharePoint people search, they will still show in the organization chart webpart in my site etc. Why is it so?. You (or) person who has done configuration of the user profile forgot to filter the disabled user accounts from active directory to SharePoint. To avoid the above cases you have to filter the disabled user accounts from Active Directory to SharePoint.

In this post you will learn how to filter user profile information of disabled user accounts from Active Directory to SharePoint.

To filter the disabled user accounts

Go to [Central administration]  [application management] [Manage service applications] [User profile service application]

The below Figure will appears.

User Profile Syn connections

Click on Configure synchronization connections under Synchronization section of user profile service application.


Edit connection Filters

From the connections you are using click on Edit connection filters menu.


Exclusion Filter for Users

It will open the Edit connection filters screen from that you can see Exclusion filter for users.

In Exclusion filter for users enter the below values.

Attribute : userAccountControls (Select from dropdown)

Operator: Bit on Equal (Select from dropdown)

Filter : 2

Once you enter the required values click on Add button and it will show the below details in Exclusion filter for users section.


Exclusion Filter added

Finally click on ok button to submit the Edit connection filters details. Once you are done wait for full synchronization to run or you can forcefully run(In Dev or Test or UAT environments).

Referencehttp://support.microsoft.com/kb/827754?wa=wsignin1.0


› Filter disabled Users from AD to SharePoint

About Author

Devendra Velegandla is a four-time recipient of Microsoft's Most Valuable Professional (MVP) award (2014-2017) for Office Servers and Services MVP and  SharePoint Server. He received the MCC award for his contributions in Microsoft MSDN/TechNet forums. He loves sharing articles, videos, and tutorial on SharePoint and Office 365.


If you found this post helpful, please share it with your friends!!


Join 6,000 subscribers and receive instant access to

Devendra's Library of Resources for SharePoint Developers