Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 680
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

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