22

I’m trying to create an event in my Microsoft Outlook calendar by using iCalendar standard. I’ve sent an email with content type “text/calendar” to my Exchange mailbox from .NET application. It arrives to Outlook as an meeting request. Everything looks good, till the moment when I click the received meeting request, Outlook displays it as an empty calendar view with the text: “Meeting cannot be found in the calendar”. I don’t understand why – I wanted to create an event and it is trying to find some existing?

If I send exactly the same email to whoever participant of the meeting except the organizer, it creates an event in their calendars and everything seems to be ok. I’ve found that it is caused by the “ORGANIZER” property. If it is set to organizer’s email (my email) and I send meeting request to myself, an event is not created with the information “Meeting cannot be found in the calendar”.

So the question is why it doesn’t create an event for organizer? Organizer must have that event created to be notified by other participants if they have accepted or cancelled the meeting.

Here is the iCalendar:

BEGIN:VCALENDAR
PRODID:-//Company//Product 3.0//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20130225T200000Z
DTEND:20130225T203000Z
DTSTAMP:20130225T143039Z
ORGANIZER;CN="John Doe":mailto:john.doe@domain.com
UID:20130225T143039Z@domain.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;RSVP=TRUE;CN="John Smith"
 ;X-NUM-GUESTS=0:mailto:john.smith@domain.com
CLASS:PUBLIC
CREATED:20130225T143039Z
DESCRIPTION:
LAST-MODIFIED:20130225T143039Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Booking test
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
gregjer
  • 2,823
  • 2
  • 19
  • 18
  • I am having the same issue, I tried sending an invite to the organizer (A) with no "ORGANIZER", the event gets added, and then I send another "REQUEST" including all the "ATTENDEE"s (B & C) and this time setting the "ORGANIZER" to A, in this case, B & C get the event right, but for A I get "Sorry! Changing the organizer is not allowed." as a result the organizer cannot view the attendees, any ideas? – Asgaroth Jul 14 '13 at 20:54
  • I have added new answer yesterday, please check that and see if that helps you – gregjer Jul 17 '13 at 07:40

6 Answers6

23

Let’s say that organizer want to create an meeting for 2 attendees. He fills in a form in the booking system. The booking system sends email containing iCalendar standard to himself and to 2 meeting attendees.

This scenario doesn’t work.

It is not possible to create an event (cancellable meeting object) in the calendar of the organizer. The client thinks that email containing iCalendar format is just notification for attendee of the meeting already created in the organizer calendar. If such an email arrives to organizer’s mailbox, client app doesn’t create an event in the organizer’s calendar. It assumes that an event was created by organizer himself. E.g.: Outlook tells you in that case that “Meeting cannot be found in the calendar”.

If you ask Microsoft support about it, they only tell you that they does not support open standards: http://support.microsoft.com/kb/2269506

Working solution to this problem is to use platform services (Exchange Web Services or Google Calendar API) to create an event in the organizer’s calendar. Forget iCalendar standard. The services can be configured for sending notifications to attendees automatically. So it is enough to pass “SendInvitationsMode.SendToAllAndSaveCopy” if you’re using EWS:

Appointment appointment = new Appointment(service);
appointment.Subject = "Status Meeting";
appointment.Body = "The purpose of this meeting is to discuss status.";
appointment.Start = new DateTime(2014, 3, 1, 9, 0, 0);
appointment.End = appointment.Start.AddHours(2);
appointment.Location = "Conf Room";
appointment.RequiredAttendees.Add("user1@contoso.com");
appointment.RequiredAttendees.Add("user2@contoso.com");
appointment.OptionalAttendees.Add("user3@contoso.com");  
appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

or set “sendNotifications” parameter to true in case of Google Calendar API.

You don’t need to send an email to every particular attendee.

gregjer
  • 2,823
  • 2
  • 19
  • 18
  • Thanks for your answer, I feared that, iCalendar is only to exchange information about an already existent event, so iCalendar alone doesn't work, and as you said, if using API's handling .ics files directly is not necessary, thanks for your answer, I'll give you the bounty but I cannot choose your answer, as its not my question. – Asgaroth Jul 17 '13 at 13:34
  • i am facing an issue with ical.net. Creating a calendar ics in my .Net application using ical.net. However, in my environment the calendar emails looks fine, with ability to accept or reject. In customers environment however there is no option coming for accept or cancel this request. This is only happening with customer on outlook 2010 and outlook 2016 too. however, in our environment we see the calendar emails just fine on outlook 2010 and 2016. Any help will be appreciated ! Thanks – kuldeep Jul 31 '17 at 12:04
  • Hi @kuldeep , did you try the answer from stu's `(to get replies you need to include the following line for each attendee: ATTENDEE;CN="The Name";RSVP=TRUE:mailto:the_email@address.com.) ` https://stackoverflow.com/a/39535174/3634867 ? – John Jang Dec 11 '18 at 02:22
20

This is a bit of an old issue, but i think it is caused from using METHOD:REQUEST This marks that the ical should be updated, not that it is a new item. Instead, use METHOD:PUBLISH

I can confirm that this works with DDay.iCal and Outlook Calendars.

Bart
  • 319
  • 2
  • 2
3

This drove me mad for a week, so it is nice to see someone else confirming what I suspected. There is actually a relatively simple solution, which solves the question, although it is not very elegant. I can understand why one would not be allowed to take the role of Organiser from an outside source, but it is annoying that you can't.

Send out 2 invites. One to yourself (or whoever the organiser is) and then a different one to everyone else.

The one to yourself should have something else other than you down as the ORGANSISER, e.g. ORGANIZER:donotreply@outlook.com

The one to everyone else should have your email down as the organizer.

For this approach to work, you should set METHOD:REQUEST. If you set it to PUBLISH you will get duplicates on updates.

This approach means you get the meeting in your diary and you also get replies (to get replies you need to include the following line for each attendee: ATTENDEE;CN="The Name";RSVP=TRUE:mailto:the_email@address.com.)

Note that the UID is the same for both versions of the file. It helps if the ORGANISER gets the Invite first so they can accept it before they start getting replies, otherwise people will be replying to something that effectively does not yet exist. That wont stop them accepting the invite, but it might be a little confusing for the ORGANIZER. To help with this I put in a slight delay between email 1 and 2.

stu
  • 196
  • 1
  • 7
0

I would assume that your problem is because Exchange assumes that the organizer of the event is also the originator of the event. Which seems fair enough, as otherwise it would be child's play to send meetings to people making them the organizer and they would be added automatically to the person's calendar.

All that said, no idea how to get around the issue.

0

the behavior of event invitation being sent by email is described in rfc6047 which further extends the icalendar RFC (RFC5545).

section 2 and section 3 on security, summarizes two spoofing threats:

spoofing the "Organizer", and spoofing an "Attendee"

that is

spoof@xyz.example.net is not allowed to modify or cancel a meeting that was organized by a@example.com.

to your case:

  1. did you send the invitation from the same email address as your exchange (talking about the From: in the mail not the Organizer:mailto ? if not it might be worth trying to send it via the exchange address.
  2. should above not work, to address your need for the organizer to have the invitation in its calendar you probably will need to add it programmatically in the organizer's agenda as it is likely that the CUA (Calendar User Agent) or Exchange does not allow a 3rd party mailer to add events in agenda without end-user UI usage.
Community
  • 1
  • 1
Auberon Vacher
  • 4,655
  • 1
  • 24
  • 36
  • Thanks for your help, email address used in invitation is same as exchange so the problem still exists, we are trying now MS Support to get some hints. – gregjer Feb 27 '13 at 11:57
0

In recent months ,our service also meet the same problem as you: our service create meeting calendar for organizer and attendees, if attendees contains organizer ,organizer (as a atteendee) can get a calendar email, but it does neither be allowed to receive/reject the meeting(the button is disabled) nor see it in calendar(no calendar event).

finally, I notice that only when under following condition this will happen: 1. mail.From = organizer 2. Ateendees.contains(organizer) //case-insensitive.

So , I simply change my code to follwing , and it works fine for all attendees (include organizer):

if (!attendeeEmail.ToLower().Contains(organizer.Address.ToLower()))
{
    message.From = organizer;
}
else
{
    //such as your actual email sender, in our case, our mail sender use another email,
    //say ActualSender,and if leave empty, then our mail sender will fill as:
    message.From = ActualSenderEmail;
}