Searching for users using node.js from ActiveDirectory

398 views
Skip to first unread message

Nataraj Gandhi arunachalam

unread,
May 4, 2017, 9:53:23 PM5/4/17
to nodejs
Dear Team,

I am trying to use activedirectory nodemodule to search for users from the Active Directory using the method, findUsers.

If i search for users using the method, findUsers, the following two queries work,

//var query = 'givenName=Nataraj Gandhi'; 
var query = 'sn=Arunachalam'; 

However if I try to write a AND condition for both givenName and sn, it doesnt work. The following is the query I am trying to execute,

var query = 'givenName="Nataraj Gandhi", sn="Arunachalam"'; 

Kindly advise how I can write an AND query for searching with both givenName and sn.


Thank you very much!

Thanks and Regards,
Nataraj



sai krishnan

unread,
Oct 6, 2017, 10:46:55 AM10/6/17
to nodejs
(|(sn=*'+searchString+'*)(cn=*'+searchString+'*))

Nataraj Gandhi arunachalam

unread,
Oct 9, 2017, 3:29:51 PM10/9/17
to nodejs
Thank you @Sai
Reply all
Reply to author
Forward
0 new messages