EWS User Impersonation, advantages, why?

Standard

 

First off all I respect all points of views, this post is intend only to expose my opinion.

ACTIVATE IMPERSONATION FOR ADMINISTRATOR

First go to Roles & Management and then Discovery Management, Second, add a function ApplicationImpersonation, then add the Administrator User Name

image image

IMPERSONATION IN DETAIL

When you connect to exchange online, you must communicate with an Exchange Web Service within a mailbox user and a password, but if you are logged with a non Administrator user you may not have Full control over the Service. This may be true when you have Hybrid Systems, and in some procedures like CreateReply() or CreateForward() you may experience Access Denied Exceptions.

Another point is if you use the Administrator Credentials and Impersonate another Mailbox you don’t have to know that users credentials and this may be an advantage in all ways.

How can we do this?

Just use your service binding method, or get it here and impersonate the service like this

service.ImpersonatedUserId = new ImpersonatedUserId
   (ConnectingIdType.SmtpAddress, 
      "You non Admin MailBox");
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s