Does anybody know how to query all groups with provided user in managed by field?
Thx in advance.
VasquezPL 0
Junior Poster
Recommended Answers
Jump to PostCan you please elaborate your problem?
Jump to PostIn your code, you have some errors at this line of code
search.Filter = String.Format[B]("managedby={0})"[/B], userName);
Correct it to
search.Filter = String.Format[B]("managedby={0}")[/B], userName);
and try once. See only the Bolded part of the code.
Sorry but you must be kidding. The Error he corrected is unfortunately an error …
Jump to PostFirst of all I have nearly the same code in one of my programms looking for users in a group. But before accessing them I have to cast to DirectoryEntry.
DirectoryEntry deUser = new DirectoryEntry(ADPath + "/" + pcoll["member"][l].ToString())
Also please speak with your local Active Directory …
Jump to PostI had the same problem and I just figured it out. I thought you might want to know.
For the filter, I was putting just the username instead of the full distinguished name. As soon as I changed it to be this filter it worked fine.
For example …
All 16 Replies
abelLazm 183
Postaholic
Saikalyankumar -2
Junior Poster in Training
VasquezPL 0
Junior Poster
VasquezPL 0
Junior Poster
Saikalyankumar -2
Junior Poster in Training
VasquezPL 0
Junior Poster
VasquezPL 0
Junior Poster
VasquezPL 0
Junior Poster
Saikalyankumar -2
Junior Poster in Training
Wegginho 0
Newbie Poster
VasquezPL 0
Junior Poster
Wegginho 0
Newbie Poster
VasquezPL 0
Junior Poster
andreamac 0
Newbie Poster
VasquezPL 0
Junior Poster
VasquezPL 0
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.