是否可以使用 CFLDAP 仅使用组电子邮件地址来检索通讯组中的所有用户?

发布于 2024-12-29 05:00:25 字数 598 浏览 0 评论 0原文

我想使用 CFLDAP 检索 Exchange 使用的某个通讯组中的所有用户。如果可以的话,CFLDAP 的“过滤器”属性应该使用什么?另外,如果我只有该组的电子邮件地址(例如 '[电子邮件受保护] '),我还能获取用户信息吗,还是我需要使用该电子邮件地址的群组的名称?

例如,我会在下面的块中放入什么?

<cfldap server = "foo.example.com"
        action = "query"
        name = "ldap2"
        start = "dc=foo,dc=example,dc=com"
        attributes = "givenName,sn,sAMAccountName,mail,employeeID,dn"
        filter="?????????????"
        username="BAR\eterps"
        password="12345" >

I'd like to use CFLDAP to retrieve all the users in a certain distribution group used by Exchange. If this is possible, what do I use for the 'filter' attribute of CFLDAP? Also, if all I have is the email address for the group (e.g. '[email protected]'), can I still get the user information, or do I need the name of the group that uses that email address?

For example, what would I put in the block below?

<cfldap server = "foo.example.com"
        action = "query"
        name = "ldap2"
        start = "dc=foo,dc=example,dc=com"
        attributes = "givenName,sn,sAMAccountName,mail,employeeID,dn"
        filter="?????????????"
        username="BAR\eterps"
        password="12345" >

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一抹淡然 2025-01-05 05:00:26

根据我的经验,使用 cfldap 时不需要过滤器。当您在没有过滤器的情况下运行查询时会发生什么?

a filter is not required when using cfldap in my experience. What happens when you run the query without a filter?

拿命拼未来 2025-01-05 05:00:26

如果我正确理解您的问题,您可以使用特定的组 dn 修改启动属性,而不仅仅是根 dn,它应该只返回该组的信息。如果有一个属性指向属于该组成员的用户,请确保将其包含在属性列表中。

如果您不修改开始属性,您的过滤器将类似于 (cn=groupname),指向您想要的组。

If I understand your question correctly, you can modify the start attribute with the specific Group dn, and not just the Root dn, it should only return the info from that group. If there is an attribute that points to users that are members of that group, make sure you include that in the attribute list.

If you dont modify the start attribute, your filter would be something like (cn=groupname) that points to the group you want.

盛夏已如深秋| 2025-01-05 05:00:25

为了从电子邮件地址获取组名称,我使用了 Active Directory Explorer。我确信也有一种方法可以查询它。

获得组名称后,我为 CFLDAP 创建了过滤器: (&(objectClass=user)(memberOf=cn=Sales,ou=Email Distribution Groups,dc=foo,dc=example,dc=com)

) CFLDAP 查询结果如下所示:

<cfldap server = "foo.example.com"
    action = "query"
    name = "ldap2"
    start = "dc=foo,dc=example,dc=com"
    attributes = "givenName,sn,sAMAccountName,mail,employeeID,dn"
    filter="(&(objectClass=user)(memberOf=cn=Sales,ou=Email Distribution Groups,dc=foo,dc=example,dc=com))"
    username="BAR\eterps"
    password="12345" >

To get the Group name from the email address, I used Active Directory Explorer. I'm sure there is a way to query for it as well.

Once I had the group name, I created my filter for CFLDAP: (&(objectClass=user)(memberOf=cn=Sales,ou=Email Distribution Groups,dc=foo,dc=example,dc=com))

So the resulting CFLDAP query looks like:

<cfldap server = "foo.example.com"
    action = "query"
    name = "ldap2"
    start = "dc=foo,dc=example,dc=com"
    attributes = "givenName,sn,sAMAccountName,mail,employeeID,dn"
    filter="(&(objectClass=user)(memberOf=cn=Sales,ou=Email Distribution Groups,dc=foo,dc=example,dc=com))"
    username="BAR\eterps"
    password="12345" >
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文