none
AD attribute not showing the right value through linked server RRS feed

  • Question

  • I have a linked server setup for AD in SQL 2014. I can query most of the AD attribute except some attribute return as Null if there is a value such Enabled (user status). Any idea? Thanks
    Wednesday, July 17, 2019 3:31 PM

Answers

  • Thanks,

    I was indeed using openquery to query AD. I was able to query AD for all the attributes I want. The only one is the Enabled attribute which shows the status of the account. There is only 2 values for it, true or false. For some reason, it shows null from my SQL query.

    Anyway, I managed to find another a attribute which shows the account status for the AD users. So I think I am good for now.

    Thanks again for your help.

    • Marked as answer by hkg04 Friday, July 19, 2019 2:12 PM
    Thursday, July 18, 2019 4:59 PM

All replies

  • Hi hkg04,

     

    Thank you for your posting .

     

    Could you please share us your operation that how to get your result and provide the screenshot of your result? Please check if you are using the  correct linked server .

     

    I think you can access the data, so there might be no problem with connectivity. I suspect the problem is data.

     

    By the way , I am not similar with AD so I'm not sure how to query on AD. I think you can use OPENQUERY to receive your requirement. OPENQUERY executes the specified pass-through query on the specified linked server.

     

    Please refer to OPENQUERY (Transact-SQL).

     

    Best Regard,

    Rachel


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 18, 2019 3:22 AM
  • Thanks,

    I was indeed using openquery to query AD. I was able to query AD for all the attributes I want. The only one is the Enabled attribute which shows the status of the account. There is only 2 values for it, true or false. For some reason, it shows null from my SQL query.

    Anyway, I managed to find another a attribute which shows the account status for the AD users. So I think I am good for now.

    Thanks again for your help.

    • Marked as answer by hkg04 Friday, July 19, 2019 2:12 PM
    Thursday, July 18, 2019 4:59 PM