[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 669
  • Last Modified:

Can I validate an Active Directory userid/password using T-SQL?

I have a stored procedure that validates userid/password against an (encrpyted) SQL Server table.

I would like to be able to extend the stored procedure to determine whether the userid/password is valid to ActiveDirectory.

I have added an LDAP linked server and can read it with an OPENQUERY, but I don't know how to check the password or whether this is possible.

I assume the other alternative is a CLR assembly linked to SQL Server, but I am wondering about the T-SQL approach.

Can it be done?
0
AIBMass
Asked:
AIBMass
  • 3
1 Solution
 
AIBMassAuthor Commented:
Interesting links, but they are about replicating AD info in SQL Server.

I don't want to do that; I just want to query AD.

In VB, I can use some the .NET System.DirectoryServices objects, but I'm wondering if there is a T-SQL equivalent.

Thanks for the ideas.
0
 
AIBMassAuthor Commented:
I believe that you have to use CLR assemblies, of which there are many different approaches.

The AD password is not readable from AD.
0
 
AIBMassAuthor Commented:
I have chosen my own answer, because everyone else points the way to CLR approaches. Read these links and search for others, but it appears you have to use the CLR.
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now