none
With streaming how to get cancelled meetings ids in EWS RRS feed

  • Question

  • Here i impersonated resource calendar with user and already gave impersonate rights to that user.

    Everything is working, when ever a meeting is created i get notification with ItemID of the meeting.

    Actually below code was example for streaming inbox, where he uses WellKnowFolderName.Inbox i just changed it to WellKnowFolderName.Calendar and rest of the code was unchanged.

    In "EventType.Created" is working fine when ever i creats a meeting i am getting the update but "EventType.Delete" is not working. So what should i use to get notifications about meeting cancellation


    class Notifications
      {
            static ExchangeService service = Service.ConnectToService(UserDataFromConsole.GetUserData(), new TraceListener());
          private static AutoResetEvent Signal;
    
    
           static void Main(string[] args)
            {
                string MailboxToAccess = "Room@exchange.com";
                ImpersonatedUserId impersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, MailboxToAccess);
                service.ImpersonatedUserId = impersonatedUserId;
    
                SetStreamingNotifications(service);
    
                // Wait for the application to exit
                Signal = new AutoResetEvent(false);
                Signal.WaitOne();
    
            }
            static void SetStreamingNotifications(ExchangeService service)
            {
               // Subscribe to streaming notifications on the Inbox folder, and listen 
                // for "NewMail", "Created", and "Deleted" events. 
               StreamingSubscription streamingsubscription = service.SubscribeToStreamingNotifications(
                    new FolderId[] { WellKnownFolderName.Calendar },
    
                    EventType.Created,
                  EventType.Deleted);

    Thanks in advance for suggestions.


    Thursday, May 19, 2016 12:20 PM

Answers

  • The function that Streaming notifications serves is to tell you that something has updated in a folder, eg if an Item is Created, Deleted, Modified etc you will get a notification. With Meeting objects if you have a recurring meeting where one instance of the appointment is cancelled this will only cause a modification event on the Master instance, also some updates will cause a Delete/Readded of a specific appointment (the appointment will still have the same GOID). So you need to use notifications as information that something has updated but what your talking about is more synchronization which involves you storing some type of state at the client side and logic to keep things in sync using something like SyncFolderItems or your own custom logic.

    As a general rule with things get deleted they will go into either the DeleteItems folder or in the Recoverable items folder for calendar appointment there is a specific Calendar Logging folder https://technet.microsoft.com/en-AU/library/ee364755(v=exchg.150).aspx that stores the version changes . This means with Single instance meetings you may not see a Delete Event rather a MoveEvent or modified event is fired. This is where tracking the GOID property such as https://msdn.microsoft.com/en-us/library/office/cc839502.aspx is important as this allows to relate any instance of an appointment in these folders to what was in the calendar previously.

    Cheers
    Glen

    • Marked as answer by Rahul_varma Friday, July 1, 2016 11:29 AM
    Friday, May 20, 2016 4:51 AM