EWS Mimics auto Answer Meetings

Hi,

I'm trying to create an appointment in 2 mailboxes and simulate the Auto Answer feature:

userA creates an appoitment with userB as RequiredAttendee and I want userB to automatically accept the appointment.

I have 2 solutions:

Solution 1:

I impersonate userA and create and appointment with the option CalendarItemCreateOrDeleteOperationType.SendToAllAndSaveCopy.

I then open the calendar of userB, locate the calendarEntry by CleanGlobalObjectId or GlobalObjectId, programmatically accept the invitation, and finally delete the mail from the inbox.

This is working fine but I would prefer to make it work with solution 2:

Solution 2:

I have managed to create an appointment in the 2 calendars and set the same GlobalObjectId on  the 2 meeting events. Apparently it's not sufficient.

Note:  I did not manage to set the GlobalObjectId during the creation of an event, but only during an update of an event. It had the side effect of sending a mail to the other attendee.

Steps:

1. I create the appointment on calendar A, and do not send mail when saving the appointment.

UserA is owner of the appointment.

2. I create the appointment on calendar B, and do not send mail when saving the appointment.

3. I update the GlobalObjectId in calendarB and set the same value than in calendar A.

=> This sends a mail automatically to user A.

=> There are now 2 appointments in calendar A and both have for owner user B.

I expect only one appointment in each mailbox, linked together, so that if user A cancels the meeting, user B is notified by mail.

I believe that I have to address 2 points:

- User Delegation when creating the appointments so that user A is owner of both appointments.

- Set GlobalObjectId  during creation to avoid to send mails during the updates.

What do you think? Have you achieved such functionnality in the past, if so how?

July 14th, 2013 7:18pm

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

Other recent topics Other recent topics