Solved

Reading MemberUid Attribute From AD LDAP

Posted on 2014-03-16
2
605 Views
Last Modified: 2014-04-30
Good Day

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

Please see attached image
memberuid
0
Comment
Question by:Kamal Khaleefa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 39933796
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.
0
 
LVL 16

Author Closing Comment

by:Kamal Khaleefa
ID: 40031623
you give me  a hint  from where to start .

thanks
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read https://technet.microsoft.com/en-us/windows-server-docs/security/securing-privileged-access/s…
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question