Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ActiveDirectory = require('activedirectory');
- var config = { url: 'ldap://myhotmail.onmicrosoft.com',
- baseDN: 'dc=myhotmail,dc=onmicrosoft,dc=com',
- username: 'roledene@myhotmail.onmicrosoft.com',
- password: 'myPassword'
- }
- var ad = new ActiveDirectory(config);
- var username = 'roledene@myhotmail.onmicrosoft.com';
- var password = 'myPassword';
- ad.authenticate(username, password, function(err, auth) {
- if (err) {
- console.log('ERROR: '+JSON.stringify(err));
- return;
- }
- if (auth) {
- console.log('Authenticated!');
- }
- else {
- console.log('Authentication failed!');
- }
- });
- ERROR: {"code":"ENOTFOUND","errno":"ENOTFOUND","syscall":"getaddrinfo","hostname":"myhotmail.onmicrosoft.com","host":"myhotmail.onmicrosoft.com","port":389}
Add Comment
Please, Sign In to add comment