Re: How to use Impersonation with MAPI.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



That "important link" was pulled because it doesn't work.

You have three choices:
1 - Run the service as the user you're trying to impersonate
2 - Use CreateProcessAsUser to launch a worker process as the user you're
trying to impersonate
3 - Grant permissions to the account your process runs as.

"Dipak" <dipakgpatil77@xxxxxxxxx> wrote in message
news:1150788940.355231.96360@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks for reply.
Yeah I did see the link before I post this issue. The page has good
information but some of the important links e.g
http://support.microsoft.com/kb/199190 are not working.

Even I tried
http://www.mapi33.adexsolutions.com/kb/MAPIImpersonation_eng.htm link
but the solution given there not worked for me. I still get same error.

Henry Gusakovsky wrote:
see that link for additional info
http://blogs.msdn.com/stephen_griffin/archive/2005/04/13/407925.aspx

Dipak wrote:
Hi All,

Using CDO and MAPI I discover whole exchange server.
My program runs as a NT service. If I start service under
administrative privileges then everything works fine. However, if I
start service in local system account and impersonate administrator
user then MAPI call IMsgServiceAdmin::ConfigureMsgService fails with an
error 0x80040115 (network error).

I did not find any concrete documentation on MAPI impersonation.

Can anybody please help for the same ?

Regards,
Dipak.



.



Relevant Pages

  • Re: Impersonation and MAPI
    ... connect to the exchange mailbox and fetch data. ... in order to impersonate one of the steps is to do a LogonUser. ... process as my MAPI code is in a DLL which I call from my java code ... I need to connect to Microsoft Exchange Server to retrieve data ...
    (microsoft.public.win32.programmer.messaging)
  • Re: CDO code in a Windows service getting logon failures
    ... you cannot specify a Windows user name or password. ... impersonate that user first before calling Logon (MAPI doesn't work too well ... and MAPI Developer Tool ...
    (microsoft.public.exchange.development)
  • Re: Impersonate user on logon with redemption
    ... You can impersonate another user using the Windows API (LogonUser / ... As a rule of thumb, if you need to access multiple mailboxes, run your code ... and MAPI Developer Tool ...
    (microsoft.public.outlook.program_vba)
  • Re: Impersonation and MAPI
    ... connect to the exchange mailbox and fetch data. ... in order to impersonate one of the steps is to do a LogonUser. ... process as my MAPI code is in a DLL which I call from my java code ... I need to connect to Microsoft Exchange Server to retrieve ...
    (microsoft.public.win32.programmer.messaging)
  • Re: Impersonation and MAPI
    ... happens in case 2 when that user is the not same as the mailbox i want ... I need to impersonate in that case. ... thread impersonation work with MAPI: ... Exchange Administration: If this is the case, ...
    (microsoft.public.win32.programmer.messaging)