Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

User profile

  Asked By: Ray    Date: Nov 25    Category: Sharepoint    Views: 877

Question for you experts out there.

I want to synch with AD for the SPS user profile, but there is an additional
search filter other than enabled accounts.

I want to be able to enable only accounts that does not have "test" in it as
well. Seems like we have a lot of test accounts in AD.



14 Answers Found

Answer #1    Answered By: Damini Dande     Answered On: Nov 25

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

which is something you probably aware of, already. It does not filter  out
"test" but filters out disabled accounts. so at least from that stand point
I hope this helps you.

That same filter works well in other application as well that use LDAP

Answer #2    Answered By: Addison Peck     Answered On: Nov 25

To expand on that LDAP filter  statement:

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

Depending on where the "test" is you would replace [attribute] with:
sAMAccountname - if the "test" value you're trying to filter out is in the
account name
description - if the "test" value you're trying to filter our is in the

Right now I'm shooting from the hip because I'm not in the office and can't
run a quick test  to verify. Let me know if this doesn't work or if the "test"
value you're trying to filter out is not in the account name or description.

Answer #3    Answered By: Lalit Bhattacharya     Answered On: Nov 25

!(userAccountControl:1.2.840.113556.1.4.803:=2)(!(Description = *test*))))

Did not work.

Answer #4    Answered By: Gwendolyn Acosta     Answered On: Nov 25

Are you looking for "test" in the AD account's description or account name?

Answer #5    Answered By: Kyle Hernandez     Answered On: Nov 25

Test in description.........................

Answer #6    Answered By: Kedar Phule     Answered On: Nov 25

I had a paren on the wrong side of the description attribute
Try this.


Answer #7    Answered By: Chanel Gaines     Answered On: Nov 25

Don't worry I think I got it.


Position may be a key here.

Answer #8    Answered By: Timmy Whitney     Answered On: Nov 25

You might want to also run some queries to make sure you're not excluding
legitimate users who have the letters "test" in their description like "portal
users John Beltest". Are your "test" users members of any telltale domain
groups, like a group in which you place all your test  accounts? If so, you might
consider using a query against memberOf instead of description.

Answer #9    Answered By: Harihar Sonnad     Answered On: Nov 25

Is there a way to wipe out the entire profile  database?

I did a few imports and it seems like when I go to edit a profile, it comes
up with a different user.

Answer #10    Answered By: Deven Gajjar     Answered On: Nov 25


you can delete all the users there...

Answer #11    Answered By: Latisha Schneider     Answered On: Nov 25

So, which one of the filters works for sure? The one from Mark, or then one
you pointed out yoruself Dave??

Answer #12    Answered By: Nora Maxwell     Answered On: Nov 25

I'm not sure anymore.. both might not work..Still have to test..

Answer #13    Answered By: Corina Duran     Answered On: Nov 25

Only problem. When I delete it from here, the next time I import, the user
(active) won't import anymore.

Answer #14    Answered By: Irving Hurley     Answered On: Nov 25

How would I do that for a group??????

Didn't find what you were looking for? Find more on User profile Or get search suggestion and latest updates.