Impersonate user on logon with redemption

S

Safal

Is it possible to impersonate another user(say the administrator) using the
redemption logon

Is the syntax below correct ?

set Session = CreateObject("Redemption.RDOSession")
Session.Logon '"Admin","Admin",false,true

Also do we specify the NT logon credentials or the "User Name" as per the
exchange server.

-Safal
 
D

Dmitry Streblechenko

You can impersonate another user using the Windows API (LogonUser /
ImpersonateLoggedOnUser) first, but MAPI does not work too well with
impersonation.
RDOSession.Logon takes the name of the existing profile, *not* a user name.
If you need to connect to a particular user's mailbox, use
RDOSession.LogonExchangeMailbox; it takes the user name and the Exchange
Servere name.

As a rule of thumb, if you need to access multiple mailboxes, run your code
under the user identity of the admin (or a user who can access the required
mailboxes), call RDOSession.LogonExchangeMailbox specifying the name of that
user, then open other users mailboxes using
RDOSession.Stores.GetSharedMailbox.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
D

Dan Mitchell

Dmitry Streblechenko said:
You can impersonate another user using the Windows API (LogonUser /
ImpersonateLoggedOnUser) first, but MAPI does not work too well with
impersonation.

http://blogs.msdn.com/stephen_griffin/archive/2005/04/13/407925.aspx has
more details on what exactly doesn't work -- to quote from there: "Getting
MAPI to work with impersonation is very hard. If you have an application
which uses MAPI with impersonation and you're not experiencing problems,
congratulations."

-- dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top