Free Support Forum - aspose.com

EWSClient ImpersonateUser

Hi,
I am trying to get OAuth and EWS working for sending emails.
The problem is that I get a message about SOAP and impersonation when I create the EWSClient. ( ExchangeImpersonation SOAP header must be present for this type of OAuth token)
EWSClient has an ImpersonateUser function, but I do not get to the point that I would be able to use it. It looks like the token I am getting is correct.

var tokenProvider = new MsTokenProvider(oAuth, server.Address);
var credentials = new OAuthNetworkCredential("testews@xxxxxx.xxx", tokenProvider);
asposeClient = EWSClient.GetEWSClient(url, credentials);

Any hints on getting impersonation working when using OAuth?

Thanks

@marieke.saeij,

You have inquired the same thing from us in another thread as well and I have shared feedback there. Please followup the following thread for your convenience.