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.

image

image

There are some basic examples.

Default user filter:

(&(objectCategory=Person)(objectClass=User))

Exclude accounts with no email address:

(&(objectCategory=Person)(objectClass=User)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(mail=*))

Exclude disabled accounts:

(&(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2))

Exclude accounts with passwords set to expire:

(&(objectCategory=person)(objectClass=user)(!userAccountControl=65536))

Include only the accounts with valid email addresses

(&(objectCategory=Person)(objectClass=User)(mail=*com)

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

(&(objectCategory=Person)(objectClass=User)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(!(!givenName=*)))

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.

clip_image001

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”

clip_image003

So our filter should like this.

(&(objectCategory=Person)(objectClass=User)(physicalDeliveryOfficeName=Bangalore))

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

We have to do like this.

clip_image004

In Moss 2007 can  do like this.

image

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 .

image


Comments (2)

Comments are closed.

Skip to main content