The account does not have permission to impersonate the requested user

I get a runtime error trying to impresonate a user - code below

  Service = New ExchangeService()

        Service.Url = New Uri(ApplicationItems.ExchangeURL)
        Service.Credentials = New NetworkCredential(username, password)
        Service.ImpersonatedUserId = New ImpersonatedUserId(ConnectingIdType.SmtpAddress, emailAddress)

February 18th, 2015 11:32am

The error is telling you that what ever user you have used in

 Service.Credentials = New NetworkCredential(username, password)

Doesn't have Impersonation rights, Impersonation right need to granted to that user see https://msdn.microsoft.com/en-us/library/office/bb204095%28v=exchg.140%29.aspx

Cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
February 18th, 2015 8:02pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics