Created
September 24, 2014 07:14
-
-
Save magmel48/114a17228e35761d6efc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ldap = require('ldapjs'); | |
var client = ldap.createClient({ | |
url: 'ldap://XXX.XXX.XXX' | |
}); | |
client.bind('XXX@XXX', 'XXX', function (err) { | |
if (err) { | |
console.log(err); | |
} else { | |
client.search('XXX', {filter: '(XXX=XXX)', scope: 'sub'}, function (err, res) { | |
if (err) { | |
console.log('err'); | |
} | |
res.on('searchEntry', function(entry) { | |
console.log(entry.object.objectGUID); | |
}); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment