LDAP attributes returning NULL values

  • Hi All

    Might not be the best place forum holder to put this but here goes.

    I have the following LDAP Query

    SELECT

    TOP 1000

    *

    FROM

    OpenQuery

    (

    ADSI,

    '

    SELECT

    displayName,

    sAMAccountName,

    sn,

    givenName,

    extensionAttribute6,

    department,

    badPwdCount,

    userAccountControl,

    ou,

    member

    FROM

    ''LDAP://NCSBS/DC=Netcars,DC=local''

    WHERE

    objectClass = ''User''

    '

    )

    But when we run it we get NULL for all OU's and members, this is not right as everyone is under an OU and people are at least a member of 1 group

    Can anyone shed any light?

    Thanks

    Ant

  • I vaguely remember something about there being issues with this kind of query not returning any values for fields in which the value is actually an array (i.e. potential multiples even if only one value is applicable in a given case.) I think I've seen that instead of trying to return the values somehow, that it just doesn't return anything for those.

    I could be totally wrong and I didn't spend any time researching it, so look it up before believing me. I know there is a reason I've always done AD stuff either in apps or via CLR and I believe at least one of the issues has to do with this limitation.

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Cheers BT

    I have resorted to just doing * in the LDAP as we wanted the whole LDAP path to test a couple of changes to out VBS login script which we couldn't get working, worked once we knew we had used CN instead of OU in one part.

    Would be good to see if this does get resolved in any way.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply