【问题标题】:Reading ldap group member from c#从 c# 读取 ldap 组成员
【发布时间】:2009-01-19 13:10:41
【问题描述】:

我有这段代码可以连接到 Active Directory 并获取所有存在的组,它可以工作并在结果中返回所有组:

DirectoryEntry dirEnt = new DirectoryEntry();

using (DirectorySearcher srch = new DirectorySearcher(dirEnt, "(objectClass=Group)"))
            {
                srch.PageSize = 1000;
                SearchResultCollection results = srch.FindAll();
            }

我现在想返回特定组的用户,即管理员,我该怎么做?

我曾尝试将 (objectClass=Group) 更改为 (objectClass=Group)(cn=admin) 但它没有返回任何结果。

一切顺利

【问题讨论】:

    标签: c# ldap directoryentry


    【解决方案1】:

    以下是有关如何在 Active Directory 中使用的参考:

    Howto: (Almost) Everything In Active Directory via C#

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多