node-activedirectory
node-activedirectory copied to clipboard
How to get phone number
I'm authenticating to my AD server normally. But i wish to get the phone field from my authenticated user. How can I do that? Is this functionality available in this package?
Simply add the phone number attribute, for example:
var config = { url: adConfig.url, baseDN: adConfig.baseDN, username: adConfig.username, password: adConfig.password, attributes: { user: [ 'dn', 'distinguishedName', 'userPrincipalName', 'sAMAccountName', 'mail', 'lockoutTime', 'whenCreated', 'pwdLastSet', 'userAccountControl', 'employeeID', 'sn', 'givenName', 'initials', 'cn', 'displayName', 'comment', 'description', 'telephoneNumber', 'company', 'title', 'mobile' ] }, paged: false }; var ad = new ActiveDirectory(config);
This issue should be resolved! mobile
attribute fixes my issue