• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 708
  • Last Modified:

Reading MemberUid Attribute From AD LDAP

Good Day

i need to read the values of the attribute MemberUID using ASP.net

Please see attached image
Kamal Khaleefa
Kamal Khaleefa
1 Solution
Carl TawnSystems and Integration DeveloperCommented:
Firstly you'll need to add a reference to the System.DirectoryServices assembly to your project. Then you can use something like the following:
            DirectorySearcher search = new DirectorySearcher("(&(objectClass=group)(Name=testgroup))");
            search.PropertiesToLoad.AddRange(new string[] { "MemberUID" });

            SearchResult result = search.FindOne();
            if (result.Properties["MemberUID"].Count > 0)
                string value = result.Properties["MemberUID"][0].ToString();

Open in new window

You may need to play around with the query a little, depending on your setup.
Kamal KhaleefaInformation Security SpecialistAuthor Commented:
you give me  a hint  from where to start .

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.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now