locked
Adding/Importing invite(or ICS) to Calendar using EWS API RRS feed

  • Question

  • Hi All,

    We wanted to process & add invite (ics) to attendee's calendar when they receive an invite which is from external senders using EWS API. 

    This is for those users who have not set "Automatically process requests and responses from external senders" in the settings. 

    Let us know if there is a way out.

    Thanks,

    Suchith.


    Wednesday, July 3, 2013 10:05 AM

Answers

  • 1. You just use the Accept method on the Meeting Invite http://msdn.microsoft.com/en-us/library/exchange/dd633648(v=exchg.80).aspx

    2. This depends on what format the Message Invite arrives in but. The following works for me to accept an Invite that is sent from a Gmail user

                FindItemsResults<Item> fiResults = service.FindItems(WellKnownFolderName.Inbox, new ItemView(1));
                if (fiResults.Items.Count > 0) {
                    if (fiResults.Items[0] is MeetingRequest) {
                        ((MeetingRequest)fiResults.Items[0]).Accept(true);
                    }
                    
                }
    cheers
    Glen
    Monday, July 8, 2013 6:53 AM

All replies

  • EWS doesn't have the ability to parse or import an ICS attachment if they are coming in as native Meeting invitations or responses then you can accept them using with EWS something like http://msdn.microsoft.com/en-us/library/exchange/dd633648(v=exchg.80).aspx. Otherwise you would need to parse the ICS file and update things manually.

    Cheers
    Glen

     
    Thursday, July 4, 2013 7:39 AM
  • Thanks,

    Yes, we are parsing ICS & tying to update things manually, but we are not able to set the organiser & ICalUid. 

    The organiser has to be same what ICS has & ICalUId should also be same, so that if there is an update to invite after adding to attendee's calendar then exchange backend should be able to handle it (if the invite is sent from exchange itself). 

    -Suchith

    Thursday, July 4, 2013 8:52 AM
  • Thanks,

    Yes, we are parsing ICS & tying to update things manually, but we are not able to set the organiser & ICalUid. 

    The organiser has to be same what ICS has & ICalUId should also be same, so that if there is an update to invite after adding to attendee's calendar then exchange backend should be able to handle it (if the invite is sent from exchange itself). 

    -Suchith

    For accepting an invite which already present on attendee's calendar we are able to respond, this is for those cases where invite is not added to attendee's calendar b'coz invite is sent to distribution list (user's haven't set "Automatically process requests and responses from external senders"). 
    Thursday, July 4, 2013 9:00 AM
  • You won't be able to change the Organizer of an appointment once its been created.

    >> (if the invite is sent from exchange itself).
    If the invite was sent from Exchange then you shouldn’t have a problem the pidTagGlobalObectId http://msdn.microsoft.com/en-us/library/office/cc815676.aspx is what Exchange uses to Correlate any updates or User acceptances. But as stated in the link this property is not changeable once created.

    You shouldn't really be changing any of these Id's or properties at the destination because it won't affect the source so any updates from the source would never sync up.

    Cheers
    Glen

    Friday, July 5, 2013 11:57 PM
  • OK,

    Will try to simplify the requirements, this when user's haven't set "Automatically process requests and responses from external senders":

    Scenarion 1: 

    User A who is in exchange, is sending an invite to User B (who is also in exchange) through distribution list. User B is part of this distribution list, how can we add that invite to User B's calendar using EWS API? 

    Scenario 2:

    User B (in exchange) receive an invite from User A (not in exchange, an external user). How can we add that invite to User B's calender using EWS API? 

    Saturday, July 6, 2013 6:01 PM
  • 1. You just use the Accept method on the Meeting Invite http://msdn.microsoft.com/en-us/library/exchange/dd633648(v=exchg.80).aspx

    2. This depends on what format the Message Invite arrives in but. The following works for me to accept an Invite that is sent from a Gmail user

                FindItemsResults<Item> fiResults = service.FindItems(WellKnownFolderName.Inbox, new ItemView(1));
                if (fiResults.Items.Count > 0) {
                    if (fiResults.Items[0] is MeetingRequest) {
                        ((MeetingRequest)fiResults.Items[0]).Accept(true);
                    }
                    
                }
    cheers
    Glen
    Monday, July 8, 2013 6:53 AM
  • Oh ok, we need to do FindItems on "Inbox" folder. 

    Till now I was thinking of parsing the ICS file & adding it to Exchange "Calendar" folder, I didn't realize that we can take action on "Inbox" as well.

    I will look into this.

    Thanks a lot Glen.

    -Suchith

    Monday, July 8, 2013 7:08 AM