node-activedirectory icon indicating copy to clipboard operation
node-activedirectory copied to clipboard

How to get phone number

Open christian-hess-94 opened this issue 5 years ago • 2 comments

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?

christian-hess-94 avatar Jun 10 '19 17:06 christian-hess-94

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);

alaamh avatar Apr 13 '21 09:04 alaamh

This issue should be resolved! mobile attribute fixes my issue

abdennour avatar Oct 29 '22 21:10 abdennour