Here is a sample code that retrieves the list of LDAP attributes for EmployeeID using the appsettings for LDAP domain:
main.cs1587 chars48 lines
You will need to have a valid LDAP domain specified in your appsettings.json file. Replace the employeeId variable with the actual employee ID that you want to retrieve the attributes for. The code uses the DirectorySearcher class to search for the employee with the specified EmployeeID and retrieves the list of LDAP attributes for that employee.
gistlibby LogSnag