C
C#3y ago
reeeeeee

Iterate over AD users and find some properties (EmployeeNumber, ExtensionAttributes, manager,..)

Basically all in the title. I would like to connect to local AD server, and sync some user information. Currently I have this, but it doesnt have the properties mentioned in the title using (var principalContext = new PrincipalContext(ContextType.Domain)) { var userPrinciple = new UserPrincipal(principalContext); // Performe search for Domain users using (var searchResult = new PrincipalSearcher(userPrinciple)) { var allUsers = searchResult.FindAll(); ...... process data.... } }
4 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
reeeeeee
reeeeeeeOP3y ago
I am not sure if I tried it or not, but the problem is I don't have username/password, this is just something that would run on a windows server, without any login info
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Accord
Accord3y ago
✅ This post has been marked as answered!

Did you find this page helpful?