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

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.


July 3rd, 2013 6:07am

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

 
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2013 3:42am

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

July 4th, 2013 4:55am

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"). 
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2013 5:03am

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 shouldnt 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

July 5th, 2013 8:02pm

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? 

Free Windows Admin Tool Kit Click here and download it now
July 6th, 2013 2:07pm

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
July 8th, 2013 2:57am

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

Free Windows Admin Tool Kit Click here and download it now
July 8th, 2013 3:12am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics