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 u开发者_C百科ser. How can I do this?
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.
精彩评论