0

I am using Novell LDAP library in a .NET 6 service. I'm trying to show all group members.

When there are > 1500 members, there are generated range attributes (member, range=0-1499) and I manage to bring members from them.

But when there are < 1500 members, member attribute is absent at all. Have tried to pass null as attributes parameter (and I get all attributes with no member one in the list) and have tried listing member in requested attributes array (new string[1] { "member" }), also without success.

Here is the code:

LdapSearchQueue queue = await _connection.SearchAsync(userStore,
            LdapConnection.ScopeSub, query, attributesToLoad, false, null, null);

LdapMessage message;
LdapEntry? entry = null;

while ((message = queue.GetResponse()) != null)
{
    if (message is not LdapSearchResult searchResultMessage)
    {
        continue;
    }

    entry = searchResultMessage.Entry;
    break;
}

LdapAttributeSet attributeSet = entry.GetAttributeSet();
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

0 Answers0