Filters in SharePoint User Profile Synchronization Connections

When setting up user profile synchronization in SharePoint we have to provide filters in order to import users on a specific criteria. say, we don't want to import disabled users. By default SharePoint pulls all the users from the directory source (usually Active Directory).

SharePoint 2010 has a nice user interface, where you will be able to select filter.
Go to Central Administration >> Application Management >> Manage Service Applications >> User profile service application >> Configure Synchronization Connections >> Edit connection Filters
sharepoint user profile synchronization connection filter
Select the attributes and set the operator & values accordingly. Here I've set the condition to exclude disabled accounts.sharepoint user profile filter disabled accounts
SharePoint will filter disabled accounts in user profile. You can selecting desired attributes, group them and apply AND/OR conditions further.

But in MOSS 2007 you have to enter the filter in user profile synchronization manually.
Go to Central Administration >> SSP >> User Profiles and Properties >> Configure Profile Import >> User Profile Connections
sharepoint user profile filter 
 Click on Configure Profile Import
sharepoint user profile import user filter

  Edit the Import connection
sharepoint 2007 user profile user filter
and set SharePoint user profile filters.  sharepoint 2007 user profile synchronization filter
Here is the list of frequently used filters in SharePoint user profile synchronization connection:
By default user filter will be:

SharePoint user profile filter to disable accounts/users:
(&(objectCategory=person)(objectClass=user)( !(userAccountControl:1.2.840.113556.1.4.803:=2)))

Include only the accounts with valid email addresses

Exclude accounts disabled and which has no E-Mails:

Exclude accounts with passwords set to expire:

Exclude accounts that don’t have a first name

Include only the accounts that are part of the "sales" organizational unit of
(&(objectCategory=Person)(objectClass=User)(memberof:1.2.840.113556.1.4.1941:=(CN=Authenticated Users,OU=sales,DC=crescent,DC=com)))

Include groups and exclude disable accounts with no First Name, Last Name, E-mail address:

All user objects except 'SAM'

All objects with a surname that starts with 'sa'

All contacts with a surname equal to 'Smith' or 'Jones'

Objects (Groups) with the name 'DL-786' or 'DL-000005368':
(&(objectCategory=group)|(name=DL-786*)(name=DL-000005368*)) -

SharePoint user profile exclusion filter: e.g. Exclude accounts that don't have First name:

Tip: You can write your own filters based on AD fields by looking them from a LDAP Browser/ADSI Edit console.

Configuring user profile sync: Configuring My Sites & User Profile Synchronization in SharePoint 2010 – Step by step
Search filters:

1 comment:

  1. Hello, I'm trying to configure a filter to exclude new users. I only want to update profiles that already exist in SharePoint 2007. Is this something you could help me with?


Please Login and comment to get your questions answered!

Powered by Blogger.