How can I view the groups a userid is a member of, using the LDAP protocol?

How can I view the groups a userid is a member of, using the LDAP protocol?
I'm doing this in C# with .NET framework 2.0

I'm forced to use the protocol.....

LDAP://directory.mydomain.com:389

and not the nice components available...

System.DirectoryServices.AccountManagement;
PrincipalContext
silentthread2kSenior Software EngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MishaProgrammerCommented:
Do you read these articles about your problem?
Article1
Article2
0
ITguy565Commented:
Maybe this will help :

public ArrayList Groups(string userDn, bool recursive)
{
    ArrayList groupMemberships = new ArrayList();
    return AttributeValuesMultiString("memberOf", userDn,
        groupMemberships, recursive);
}

Open in new window


source : https://www.codeproject.com/articles/18102/howto-almost-everything-in-active-directory-via-c#39
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
silentthread2kSenior Software EngineerAuthor Commented:
@Misha
How dare you talk to me like that!
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ITguy565Commented:
@silentthread2k

ROFL!
0
MishaProgrammerCommented:
@silentthread2k What the problem???
0
ITguy565Commented:
Do you read these articles about your problem?

It was a joke.. However it is difficult to read emotion though forum.

I think it was the reference to
"His Problem"
0
MishaProgrammerCommented:
@ITguy565
There is not jokes my comment. There are some solutions about LDAP and C# in these articles.  

In thise article
Article1

using method AttributeValuesMultiString(), which you also recommended author in your comment.
0
ITguy565Commented:
@Misha,

Your Killing me.. Anyway, if the Author is interested in explaining this, I will let he/she do so, otherwise, I am not going to attempt to discuss it further as you clearly don't understand why he/she responded the way they did.
0
Shaun VermaakTechnical Specialist/DeveloperCommented:
You can use System.Management and basically use VBScript in your .NET app seeing that you can not use
System.DirectoryServices.AccountManagement;
PrincipalContex


All the links posted above use System.DirectoryServices.AccountManagement, PrincipalContext etc unless I checked incorrectly
0
silentthread2kSenior Software EngineerAuthor Commented:
Resolved using different google searches and information provided in this post.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
LDAP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.