Suresh
Suresh

Reputation: 31

How to impersonate current outlook user in outlook addin (.NET Code)

I am having a .net based outlook addin that will communicate exchange web service using stored credentials (user name and current password). Now i wanna remove this dependacy and impersonate current outlook user. How can I do this?

Upvotes: 0

Views: 841

Answers (1)

Henning Krause
Henning Krause

Reputation: 5422

You won't get the current username from Outlook. Unless the user signed in to Outlook using Windows Authentication, in this case you can simply use CredentialCache.DefaultNetworkCredentials.

Why are you using EWS to communicate with Exchange? Instead you could use the Outlook object model.

Upvotes: 1

Related Questions