Solved

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

Posted on 2011-09-06
5
517 Views
Last Modified: 2012-05-12
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
Comment
Question by:AIBMass
  • 3
5 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 36491687
0
 

Author Comment

by:AIBMass
ID: 36491799
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
 
LVL 39

Expert Comment

by:appari
ID: 36500673
0
 

Accepted Solution

by:
AIBMass earned 0 total points
ID: 36502404
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
 

Author Closing Comment

by:AIBMass
ID: 36527874
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AD Sites/AD Replication 11 34
add group policy for windows 10 users 3 33
Locating a GPO setting 3 31
Office 365: Content Search, Search and Purge 17 13
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question