是否可以使用 CFLDAP 仅使用组电子邮件地址来检索通讯组中的所有用户?
我想使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
根据我的经验,使用 cfldap 时不需要过滤器。当您在没有过滤器的情况下运行查询时会发生什么?
a filter is not required when using cfldap in my experience. What happens when you run the query without a filter?
如果我正确理解您的问题,您可以使用特定的组 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.为了从电子邮件地址获取组名称,我使用了 Active Directory Explorer。我确信也有一种方法可以查询它。
获得组名称后,我为 CFLDAP 创建了过滤器: (&(objectClass=user)(memberOf=cn=Sales,ou=Email Distribution Groups,dc=foo,dc=example,dc=com)
) CFLDAP 查询结果如下所示:
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: