英文:
LDAP multiple locations
问题
这里是否有一种方法可以添加多个位置?我需要这样做以进行测试,并在多个位置上添加LDAP过滤器。目前,我只有一个位置。我想至少测试两个位置。
<Employees FileFormat="LDAP"
FilePath="LDAP://LDAPS.company:6367"
Filter="(&(objectClass=user)(objectCategory=person)(givenName=*)(sn=*)(mail=*)(PhysicalDeliveryOfficeName=Test Location))"
FilterOptions="Subtree">
英文:
Is there a way to add multiple locations here? I need to do this for testing purposes and to add ldap filter on multiple locations. Currently, I only have one location. I would like to test with at least two locations.
<Employees FileFormat="LDAP"
FilePath="LDAP://LDAPS.company:6367"
Filter="(&amp;(objectClass=user)(objectCategory=person)(givenName=*)(sn=*)(mail=*)(PhysicalDeliveryOfficeName=Test Location))"
FilterOptions="Subtree">
答案1
得分: 1
使用LDAP的“或”运算符,即|
,如下所示:
Filter="(&(objectClass=user)(objectCategory=person)(givenName=*)(sn=*)(mail=*)(|(PhysicalDeliveryOfficeName=Test Location)(PhysicalDeliveryOfficeName=Test Location 2)(PhysicalDeliveryOfficeName=Test Location 3)))"
有关如何构建LDAP查询的详细信息,请参阅:Active Directory: LDAP Syntax Filters。
英文:
Use the LDAP "or" operator, which is |
, like this:
Filter="(&amp;(objectClass=user)(objectCategory=person)(givenName=*)(sn=*)(mail=*)(|(PhysicalDeliveryOfficeName=Test Location)(PhysicalDeliveryOfficeName=Test Location 2)(PhysicalDeliveryOfficeName=Test Location 3)))"
More details about how to build LDAP queries is here: Active Directory: LDAP Syntax Filters
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论