LDAP Query

sreins
sreins used Ask the Experts™
on
I need a simple LDAP query to retrieve an email address for a userid.

Something like the following

SELECT ????
FROM  'I Have this'
WHERE objectClass = '?????' and ?????='UserID to be inserted"
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
What are you using to run this? It looks like a SQL statement?

If you are just trying to get the email you can do the following assuming you have installed the adminpak.msi on your desktop.

Dsquery user -samid {username} | dsget user -ln -fn -email
You may also want to give this a shot.


SELECT mail
FROM  'I Have this'
WHERE objectClass = 'user' and samaccountname='UserID to be inserted"

Author

Commented:
yes, this is what I needed.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial