Last post Aug 24, 2006 05:29 PM by Vader
Aug 22, 2006 01:31 PM|Vader|LINK
What is the best practice to find all accounts that does not have a membership "other that the primary"
Do i have to enumerate MemberOf property and count "which i do not want to" ore is there a more easy way like an searchstring for DirectorySearcher.Filter="memberof > 0" ore a propert "totalNrOfmemberships" that i can check?
I also used the tokenGroup property of the user object to build myself an octetString to be used as an filter for the directorysearcher. "I want to get all entries in the MemberOf property as quick as possible you se". After running the Searcher.FindAll()
i got nothing in my little searchresultCollection event though i know that user.Propert["tokenGroup"].Count is > than 0. Is there anyone that knows what im talking about and have experienced something like this.
Aug 22, 2006 05:49 PM|dunnry|LINK
Aug 23, 2006 04:05 AM|Vader|LINK
Greate!! thanks ones again.
Any ide on the last question? I just bought a book called" Guide to directory service prog" where i found the idea of using tokenGroup, the first example out of three. I just reasently understood that you where one of the writers "respect", one of the best
books i have ever bought about programing.
Aug 23, 2006 09:16 AM|dunnry|LINK
Aug 24, 2006 05:29 PM|Vader|LINK
It sure did clear things up for me about the tokenGroup thing. greate!!
I have to run some more test later cause the issue where that the tokenGroup code part did not collect any groups to enumerate in the searchresultCollection. I used the code that u wrote in youre book... Technique#1: using an Ldap Search.... page 391-392.
Had probs everything that day so i try again next week :)