Skip to content

Ldap GetMembers working over 389 port #65894

@AALOON

Description

@AALOON

Description

Hi!

When GroupPrincipal.GetMembers used and 389 port blocked on machine (and 636 specified on connection string)
Method not working

problem is here:
https://github.com/dotnet/runtime/blob/main/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs
protected virtual void LoadDomainInfo()

image

Reproduction Steps

var options = Negotiate | SecureSocketLayer;
using var context = new PrincipalContext( ContextType.Domain, "domain:636", "DC=domain", options);
using (var indentity = GroupPrincipal.FindByIdentity(context, "Group"))
{
var tmp = indentity.GetMembers(true).First(); // we will wall
}

Expected behavior

When domain specified, used same port (LDAPS) communication

Actual behavior

Method failed when 389 blocked

Regression?

No response

Known Workarounds

No response

Configuration

  • Net462, NetCore31, NetCore5 and other
  • Windows
  • Debug, Release

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions