In C# I am binding to a secure LDAP site with the following code
authServer =
new DirectoryEntry("LDAP://whatever.com:636",
authServerUsernameFromConfig,
authServerPasswordFromConfig,
AuthenticationTypes.Anonymous );
then searching for a user which is found OK.
then the following collection is examined looking for property name of “groupMembership”
DirectorySearcher directorySearch = new DirectorySearcher(authServer, filterKey);
...
SearchResult result = directorySearch.FindOne();
...
authUser = new DirectoryEntry(result.Path, userDN, password, AuthenticationTypes.None);
...
(read) authUser.Properties.PropertyNames
However none are found when using 636 secure port. Other properties are found. When binding to non secure PORT all properties are found both those with 636 bind and also those named groupMembership.
Can anyone explain why this might be or how to retrieve them.
In seems that with the LDP.exe utility can see these groupMembership properties with a secure port 636 bind.
Use a known good tool like
ldapsearchto verify that an LDAP client can access data as required. If the known good LDAP client can access the data and a hand-coded LDAP client cannot, then check the following parameters of the search request:BASEonly returns the entry and request attributes,ONEreturns the entries immediately subordinate to the base object,SUBreturns the base object and all entries sub-ordinate to the base object, on any level.see also