select cn, mail, distinguishedname, displayname, samaccountname FROM OPENROWSET('ADSDSOObject',
'adsdatasource;', 'SELECT cn, mail, distinguishedName, displayName, samaccountname
FROM ''LDAP://COMPANY.com'' where objectClass = ''User'' and objectCategory=''Person'' ') ad
inner join usermanagement.dbo.[user] u
on u.useremail = ad.mail
Sunday, March 22, 2009
Get user details from Active directory by using SQL Commands
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment