1

I have a Nodejs application and I can't seem to get an entities unique ID's here is the module I am using:

https://www.npmjs.com/package/activedirectory

pulling for groups and I can't seem to get the following attributes:

  • objectGUID

  • objectSid

here is the snippet

var ad = new ActiveDirectory(domainConfig);
var query = 'CN=*';
ad.findGroups(query, function (err, result) {
    if (err) {
        console.log(err);
        log.error("No Groups found.");
    }
    log.info(result);
});

am I missing something? by default, all attributes should be returning

attributes - attributes to select and return (if these are set, the server will return only these attributes). Defaults to the empty set, which means all attributes.

  • Have you solved the problem with rubbish instead of data? https://stackoverflow.com/q/46810881/4928642 – Qwertiy Oct 18 '17 at 13:06

1 Answers1

0

I agree, this is an error. However, you can get around this by explicitly specifying the attributes that you want. Note that these are case sensitive.

var ad = new ActiveDirectory(domainConfig);
var query = { filter: 'CN=*'
              attributes: ["dn", "cn", "description", "objectGUID", "objectSid"]};
ad.findGroups(query, function (err, result) {
    if (err) {
        console.log(err);
        log.error("No Groups found.");
    }
    log.info(result);
});
Ryan
  • 2,058
  • 1
  • 15
  • 29
  • Unfortunately I'm getting rubbish instead of the data: https://stackoverflow.com/q/46810881/4928642 – Qwertiy Oct 18 '17 at 13:05