How to Build a Search Filter in LDAP Query

All, I would like to know how to build a search filter in ldap query in order to search for the users from a particular group for a given DN and OU. Please note that I am making use of LDAP Tools plugin.

Here's the information of the LDAP environment:

Full LDAP Server URL: ldap://myhostname:389
Service Manager Username: CN=Administrator
Service Manager Password: Welcome@123
Base DN: dc=appian
OU: hr (heirarchically falls under dc=appian)
scsExternalSystemKey: ldap.local

And here's how I have tried configuring the search filter in various ways, but I am unable to retrieve any results:

1. ldapsearch(
config:{
scsExternalSystemKey:"ldap.local",
usePerUserCredentials:false,
url:"ldap://myhostname:389",
baseDN: "dc=appian,ou=hr"
},
searchFilter:"(&(ObjectClass=inetOrgPerson)(uid=user.1)(memberof=CN=development,OU=hr,DC=appian))",
attributes:{},
pagingInfo:a!pagingInfo(
startIndex:1,
...

OriginalPostID-214261

OriginalPostID-214261

  Discussion posts and replies are publicly visible

Parents
  • Just to give an update, I was able to resolve the issue. The LDAP vendor I have used is making use of a attribute by name 'isMemberOf' which is equal to 'memberOf' attribute in AD. Additionally inclusion of OU attribute in the searchFilter has blocked the results.

    Following expression is able to return me the results I have desired for:
    fn!ldapsearch(
    config:{
    scsExternalSystemKey:"ldap.local",
    usePerUserCredentials:false,
    url:"ldap://myhostname:389",
    baseDN: "dc=appian,ou=hr"
    },
    searchFilter:"(&(ObjectClass=inetOrgPerson)(uid=user.1)(isMemberOf=cn=development,dc=appian))",
    attributes:{},
    pagingInfo:a!pagingInfo(
    startIndex:1,
    batchSize:-1
    )
    )

    @mike.cichy Thanks for the inputs.
Reply
  • Just to give an update, I was able to resolve the issue. The LDAP vendor I have used is making use of a attribute by name 'isMemberOf' which is equal to 'memberOf' attribute in AD. Additionally inclusion of OU attribute in the searchFilter has blocked the results.

    Following expression is able to return me the results I have desired for:
    fn!ldapsearch(
    config:{
    scsExternalSystemKey:"ldap.local",
    usePerUserCredentials:false,
    url:"ldap://myhostname:389",
    baseDN: "dc=appian,ou=hr"
    },
    searchFilter:"(&(ObjectClass=inetOrgPerson)(uid=user.1)(isMemberOf=cn=development,dc=appian))",
    attributes:{},
    pagingInfo:a!pagingInfo(
    startIndex:1,
    batchSize:-1
    )
    )

    @mike.cichy Thanks for the inputs.
Children
No Data