User Profile filtering in 2010 and 2007

This article describes how to import user profile information using different filters.

Search filters enable you to define search criteria and provide more efficient and effective searches.

There are Operates.



There are some basic examples.

Default user filter:


Exclude accounts with no email address:


Exclude disabled accounts:


Exclude accounts with passwords set to expire:


Include only the accounts with valid email addresses


Include only the accounts that are part of the Branch1 organizational unit

(&(objectCategory=Person)(objectClass=User)(memberof:1.2.840.113556.1.4.1941:=(CN=Authenticated Users,OU=Branch1,DC=domain,DC=local)))

Exclude accounts that don’t have a first name


So lets take a example we want to pull profiles of the all the users with are in location say “Bangalore”

Usually user have a attribute called Office.


So if the user have their office in their Ad attribute. We can add filter to each UPA to pull users which are specific to each office. By doing this we can avoid duplication of users.

To do that we need a filter . In research I found that actual attribute is “physicalDeliveryOfficeName”


So our filter should like this.


As in SharePoint 2010 we can’t added filter directly.

We have to do like this.


In Moss 2007 can do like this.


After that we have to run full import and it will mark all unwanted user for delete. But user with office location Bangalore will stay .