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:389Service Manager Username: CN=AdministratorService Manager Password: Welcome@123Base DN: dc=appianOU: 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
Discussion posts and replies are publicly visible
Hello All,
I am facing following issue with ldapsearch().
Could anyone please suggest what could be the issue?
Active Directory Configuration:
Scenario#1
= ldapsearch(
config: {
scsExternalSystemKey: "ldap.test",
usePerUserCredentials: false,
url: "ldap://10.X.X.X:389",
baseDN: "DC=PSIAPPIAN,DC=com"
},
searchFilter: "(&(ObjectClass=organizationalPerson)(uid=Administrator)(isMemberOf=CN=Administrators,CN=Builtin,DC=PSIAPPIAN,DC=com))",
attributes: {},
pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: - 1
)
Output:
LdapResponse
success: false
result: null (DataSubset)
error: "Failed to request page: javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-03100213, problem 2001 (NO_OBJECT), data 0, best match of: '' ]; remaining name ''"
Scenario#2
=ldapsearch(
url: "ldap://10.X.X.X:389/DC=PSIAPPIAN,DC=com"
success: true
result: DataSubset
startIndex: 1
batchSize: -1
sort: null (List of SortInfo)
totalCount: 0
data: null (List of Variant)
identifiers: null (List of Variant)
error: null (Text)
In scenario#2, it returns success: true however the data was returned as null, it should have returned data for "Administrator".
And I am using complete DN as username in third party credentials store.