none
Subscribing to new mail event of multiple impersonated user through one ExchangeService object RRS feed

  • Question

  • I am able to subscribe to push notifications by specifying impersonating users' credentials and then specifying impersonated user's email in ExchangeService' ImpersonatedUserId property.

    However want to know how can I handle new email events on multiple email ids that are impersonated by one email id, since there is no collection as such on ExchangeService to specify multiple Impersonation Ids. In fact I think we can handle only one email id by using single ExchangeService object. And to subscribe to multiple user mail events, even through impersonation, I have to create multiple instances of ExchangeService. And also multiple callback listeners too. This is what I want confirmation about:

    Q. Do I need to create multiple instances of ExchangeService and callback listeners to handle new mail event on multiple user id with impersonation?

    Q. Without impersonation?

    Q. Also want to know given credentials of impersonating user, can I retrieve list of all users impersonated by that user.
    • Edited by Mahesha999 Wednesday, January 15, 2014 2:44 PM
    Wednesday, January 15, 2014 12:20 PM

All replies

  • >> Do I need to create multiple instances of ExchangeService and callback listeners to handle new mail event on multiple user id with impersonation?

    For what version of Exchange ? In 2013 you do have the option of grouping see http://msdn.microsoft.com/en-us/library/office/dn458789(v=exchg.150).aspx#bk_throttling . In 2010 I believe the only way is to use a separate Instance sfor every user your impersonating.

    >> Without impersonation?

    You don't need a separate instance in this case (you need separate subscriptions for each mailbox). However there are throttling limitations around the total number of subscriptions one particular user can make see http://msdn.microsoft.com/en-us/library/office/dn458788(v=exchg.150).aspx

    >>Q. Also want to know given credentials of impersonating user, can I retrieve list of all users impersonated by that user.

     There is no cmdlets or EWS operations that can tell you this, however if you having logging enabled then you should be able to track the user of impersonation though the logs on IIS and the EWS.log see http://blogs.msdn.com/b/webdav_101/archive/2012/06/27/the-importance-of-ews-impersonation-while-using-an-application-account.aspx 

    Cheers
    Glen

    Thursday, January 16, 2014 4:43 AM
  • > Without impersonation?

    You don't need a separate instance in this case (you need separate subscriptions for each mailbox). However there are throttling limitations around the total number of subscriptions one particular user can make see http://msdn.microsoft.com/en-us/library/office/dn458788(v=exchg.150).aspx

    For subscribing to mailbox of same user id, we can use same object of ExchangeService. However I did asked for subscribing to mailboxes of different user ids (or simply multiple mailboxes) without impersonation. I cannot find how can I specify credentials for multiple mailboxes on single instance of ExchangeServer. Just following:

      service.Credentials = new WebCredentials(userid, password);

     Is it really possible to use same instance ExchangeService to subscribe to multiple mailboxes?




    • Edited by Mahesha999 Thursday, January 16, 2014 8:41 AM
    Thursday, January 16, 2014 8:36 AM
  • In the scenario your talking about for this to work the User Account your using for Authentication must be granted Access to the Folders your subscribing to (either on the Folder using Add-MailboxFolderPermission or Outlook delegation) or on the Mailbox using Add-MailboxPermission.

    >>I cannot find how can I specify credentials for multiple mailboxes on single instance of ExchangeServer

    A single Instance of the ExchangeService object will only every use one Set of credentials (exactly the same as httpwebrequest).

    Cheers
    Glen

    Friday, January 17, 2014 3:15 AM