?
Solved

Reading MemberUid Attribute From AD LDAP

Posted on 2014-03-16
2
Medium Priority
?
673 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
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 1500 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Suggested Courses

750 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