Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

How go from directoryentry to spuser

$
0
0

Hello,

I need to add the users from A.D. group to a SP group. I have done the :

DirectoryEntry entry = new DirectoryEntry("LDAP://OUdfdsft Users,DC=dsfdsf,DC=com");
            DirectorySearcher mySearcher = new DirectorySearcher(entry);
            //mySearcher.Filter = ("(objectClass=*)");
            mySearcher.Filter = String.Format("(employeeID={0})", "11111");
            SearchResult result = mySearcher.FindOne();
            DirectoryEntry myDirectoryEntry = result.GetDirectoryEntry();

But I don't know how to continue afterwards.

Thank you


Christos


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>