Link to home
Start Free TrialLog in
Avatar of asaeed
asaeed

asked on

Retrieving Data From Ms. Exchange Server Through Visual Basic

I want Visual basic to connect to Ms. Exchange server For email addresses and the windows 2000 server user manager so that it can authenticate the user from the user database. How do i connect to windows 2000 ,exchange server database through VB
ASKER CERTIFIED SOLUTION
Avatar of GregD
GregD

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of asaeed
asaeed

ASKER

Will this also get the Passwords cuz i what to match the user name and Password for further process
No, you can't retreive a password but you can authenticate as someone else for example

Dim openDS As IADsOpenDSObject
Dim comp As IADs
 
Set openDS = GetObject("LDAP:")
Set comp = openDS.OpenDSObject("LDAP://CN=DCNAME,OU=Domain Controllers,DC=DOMAIN,DC=co,DC=uk", "administrator", "password", ADS_SECURE_AUTHENTICATION)


This will authenticate to the AD by binding to the domain controller object DCNAME as the administrator. It will send the authentication using either NTLM or Kerberos depending on your setup, you only need to worry about getting the username & password from the user securely.

if the username/password is incorrect a runtime error is returned, you can capture this in your error handler using err.description & err.number.

Cheers
Greg.