User Profile Imports: How to Filter out Disabled Users


SharePoint 2010

Update: Post now resides at new blog site!

Here is how to filter out disabled Active Directory user accounts from your User Profile Synchronization Connection:

The default after setting up your connection is to pull back all Active Directory users. To change that you need go to the Configure Synchronization Connection screen, then use the drop down and select Edit Connection Filters.

As you can tell from the top section, you currently have no filters on the user accounts being imported. In the second section, set the following fields:

  • All apply (AND)
  • Attribute: userAccountControl
  • Operator: Bit on equals
  • Filter: 2

Click Add, and then scroll down to click Ok. As you scroll down, notice that you can also set filters on Group accounts.

Now, during your next import you will only get active user accounts.


Sponsors *Trusted SharePoint Ads Only!*

Packaged Enterprise Search
for SharePoint.View a quick online demo here!

Free Outlook Sidebar!
Access SharePoint from Outlook w/ Sidebar. Download Now!

SharePoint Admin Toolkit – Download now!
FREE Tools to Simplify SharePoint Management

SharePoint Migration Tools
Sharegate: No-Brainer Migration Tools for SharePoint. $375.

SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.

8 Tips to Increase SharePoint Adoption
Download Free Whitepaper


Subscribe to our RSS feed and social profiles to receive updates.

4 Comments on “User Profile Imports: How to Filter out Disabled Users”

  1. Ian Says:

    Thanks for this.
    Is there also a way to filter out users with no e-mail address specified ?
    We’re using Exchange so the Exchange attributes show in the Attribute dropdown, i’m just not sure whioch one I would choose to exclude users where we’ve removed e-mail.



    • sptwentyten Says:

      I don’t have Exchange installed to test, but I got it to work by using Attribute: mail with Operator = is not present. Leave Filter blank. Run a full User Profile Sync.


  2. mak Says:

    Hi.First time I got all users (also Disabled). When I set up your option with userAccountControl and start full synchro – it doesn’t remove disabled profile. What to do with that ?


    • sptwentyten Says:

      Interesting. I did the same when setting this up and it removed the disabled accounts for me. Try doing an incremental sync instead and see what you get. Also, double check the settings and make sure you did this on the Users section and not the Groups section.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: