Reputation: 83
I have a streaming notifications listener that's subscribed to multiple mailboxes. When a creation notification comes in, I bind to the created item to try to learn more about it.
I try to look at the ParentDirectoryID.Mailbox
to try to figure out where the item is being created in, but it's null. The API says that the Folder ID and the FolderName/Mailbox properties are mutually exclusive.
So, how do I load the FolderName/Mailbox properties?
Upvotes: 4
Views: 587
Reputation: 5337
I suggest you should go with the following approach to solve your problem:
List
or Dictionary
(it's up to you) to store entries of SubscriptionId
and MailBox
at the time of subscription, once you received notification, extract SubscriptionId
and map to your stored List
/Dictonary
to get mailbox. This solution is convenient if you don't need any extra details from Exchange, as is makes fewer calls to Exchange.
MailBox
details from passing ExtendedPropertyDefination
details and make call using extracted ItemId
from notification.I believe you get both of the approaches.
Upvotes: 1