Outlook shows iCal date changed despite it being the same date - outlook

I'm generating iCal files and sending them via e-mail to the person that registered to a certain event on the intranet. This happens in an internal company network where everyone has to use MS Outlook, so I am mostly concerned that it looks correct on Outlook.
When the event on the intranet is changed, a new event invite with a current iCal is being sent to the registrant.
However, no matter what I change, the date keeps being highlighted as changed, despite the date being exactly the same as on the first iCal file.
Does anyone know why this happens?
I did try:
Increment the SEQUENCE number each time (first 0, then 1 and so on)
Set a custom (always the same) DTSTAMP
The event UID is exactly the same, proven by the fact that the existing event gets updated in Outlook
Note on the following screenshot that the location well has changed (and is also highlighted), but the date did not, but is still highlighted.
My iCal looks like this:
----__--MAILNEXTPART--__--
Content-Type: multipart/alternative; boundary="--__--MAILINNERBOUNDARY--__--"
----__--MAILINNERBOUNDARY--__--
Content-Type: text/calendar; charset="UTF-8"; method=REQUEST
Content-Transfer-Encoding: quoted-printable
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Microsoft Corporation//Outlook 14.0 MIMEDIR//EN
METHOD:REQUEST
BEGIN:VEVENT
UID:icalevent-8315-108-2019-05-03T11:00:00-2019-05-03T13:00:00
DTSTART:20190503T110000Z
SEQUENCE:2
TRANSP:OPAQUE
STATUS:CONFIRMED
DTEND:20190503T130000Z
LOCATION:Another Company\, \nAnother Street\, \nCH-1000 Lausanne
SUMMARY:Testevent for Outlook calendar
ATTENDEE:event-registrant#domain.com
CLASS:PUBLIC
DESCRIPTION:This is the description.
ORGANIZER:organizer#domain.com
DTSTAMP:20190503T110000Z
END:VEVENT
END:VCALENDAR
----__--MAILINNERBOUNDARY--__----
----__--MAILNEXTPART--__----
Note that I did try in this one to set the DTSTAMP to the event start date/time but this had no effect on the behavior, even if it lies in the future.

Related

Outlook fails to recognize custom UID in .ics file, creates new event (and new id)

What I am trying to do:
I have a need to send my clients .ics files that will populate their Outlook calendars as soon as they download and double click (and choose to populate their Outlook calendar).
When I am testing locally, the iCalendar code below works fine if I set Outlook to work offline - a UID is generated once for each event, I can use the same file again and again and a new event will not be generated - as the UID is recognized by Outlook as already existing. (so I can rely on the UID to update, and cancel as well)
The issue is that when I work with an online Outlook, a random UID (112 characters long) is generated every time I use the file to populate the calendar - even for the same events - so a duplicate event is generated every time!
Example for an .ics file:
BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
PRODID:-//PYVOBJECT//NONSGML Version 1//EN
BEGIN:VEVENT
UID:12345
DTSTART:20190715T020222Z
DTEND:20190715T030222Z
DESCRIPTION:Some fake summary - first event
DTSTAMP:20190715T010222Z
SEQUENCE:0
SUMMARY:this is the first event summary
END:VEVENT
BEGIN:VEVENT
UID:67890
DTSTART:20190715T040222Z
DTEND:20190715T050222Z
DESCRIPTION:Some fake summary - second event
DTSTAMP:20190715T010222Z
SEQUENCE:0
SUMMARY:this is the second event summary
END:VEVENT
END:VCALENDAR
If I generate an .ics file for the first event that was generated when Outlook is online (dragging and dropping out of the calendar) I see that Outlook has added a bunch of new fields:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Microsoft Corporation//Outlook for Mac MIMEDIR//EN
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:Pacific Time (US & Canada)
X-ENTOURAGE-CFTIMEZONE:US/Pacific
X-ENTOURAGE-TZID:1
BEGIN:STANDARD
RRULE:FREQ=YEARLY;INTERVAL=1;BYSECOND=0;BYMINUTE=0;BYHOUR=2;BYDAY=1SU;BYMONTH=11
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
DTSTART:20071104T020000
END:STANDARD
BEGIN:DAYLIGHT
RRULE:FREQ=YEARLY;INTERVAL=1;BYSECOND=0;BYMINUTE=0;BYHOUR=2;BYDAY=2SU;BYMONTH=3
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
DTSTART:20070311T020000
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:<a NEW 112 character id - NOT the one I added myself>
X-ENTOURAGE_UUID:81760164-FB2C-4421-B7AC-2E1791265F0A
X-MICROSOFT-EXCHANGE-ID:<base64, 140 character id>
X-MICROSOFT-EXCHANGE-CHANGEKEY:<base64, 32 character id>
DTSTAMP:20190715T023949Z
DTSTART;TZID="Pacific Time (US & Canada)":20190714T190200
DTEND;TZID="Pacific Time (US & Canada)":20190714T200200
LAST-MODIFIED:20190715T023949Z
SUMMARY:this is the first event summary
DESCRIPTION:Some fake summary - first event
ORGANIZER:MAILTO:<the real account owner email - my email>
SEQUENCE:0
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-DISALLOW-COUNTER:TRUE
X-MICROSOFT-DONOTFORWARDMEETING:FALSE
X-MICROSOFT-CDO-INSTTYPE:0
END:VEVENT
END:VCALENDAR
What I tried:
Modified: METHOD:REQUEST
Added X-WR-RELCALID:some_unique_id from this post
Sequence does not seem to help - it is only there to sort out if 2 UIDs are the same within the same file
I added ORGANIZER;CN=Fable mail:MAILTO:fable.mail#example.com to each event - it has the same issue as the UID, and is disregarded (my email is added as the organizer)
I added ATTENDEE:MAILTO:somemail#email.com as suggested in this post, but it does not seem to make any difference
Is it because I am not using the recommended standard for the UID? It seems like a suggestion to prevent collisions, nothing more.
Thank you!
The problem still persists on latest Outlook 2019 from Office 365.
Even Microsoft support suggests to add this as feature request to the outlook suggestion box. (see here: https://answers.microsoft.com/en-us/msoffice/forum/all/ics-file-does-not-update-event/38548f62-d9cd-4b85-8d3e-65217d4e8f50)
Others suggest to create an application which communicates with outlook and synchronizes the calendar entries by this way. But in my opinion this is a too heavy solution for such a small problem.
When you upload the .ics file to outlook live via the desktop browser, I have used edge mobile set as desktop for this, and select add calendar in the expanded left sidebar followed by upload from file in the following selection menu the UID replacement does not take place.
P.S. Entering the data via outlook mail replaced the UIDs even if they did comply to the official recommendations in the specification.

ics not updating organizer calendar

I am writing an application that will send out .ics files to be interpreted mainly by outlook. When my applications sends an update, it will successfully update everyone's calendar except for the organizer's calendar. I'm using the same UID and I'm incrementing SEQUENCE each time. Is there anything else that I'm missing in my ICS file or does it not update my calendar because I am the organizer?
Below is an example of the ics code that we're using:
BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 16.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VTIMEZONE
TZID:Eastern Standard Time
BEGIN:STANDARD
DTSTART:16011104T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010311T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ATTENDEE;CN='test';RSVP=TRUE:mailto:test#testing.com
ATTENDEE;CN='attendee';RSVP=TRUE:mailto:attendee#attendees.com
CLASS:PUBLIC
CREATED:20180628T182531Z
DTSTART;TZID=Eastern Standard Time:20180630T141500
DTEND;TZID=Eastern Standard Time:20180630T160000
DTSTAMP:20180628T182531Z
LAST-MODIFIED:20180628T182531Z
LOCATION:some place
ORGANIZER;CN=Conference Room Board:mailto:test#testing.com
PRIORITY:5
SEQUENCE:1
SUMMARY;LANGUAGE=en-us:test
TRANSP:OPAQUE
UID:SomeUniqueUID
CREATED:20180628T182531Z
DESCRIPTION:Test
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-DISALLOW-COUNTER:FALSE
X-MS-OLK-AUTOFILLLOCATION:TRUE
X-MS-OLK-CONFTYPE:0
END:VEVENT
END:VCALENDAR
Thanks for any help!
This is expected. As the organiser, your client assumes that only itself is in control of invitation. As such it ignores invitations sent by other parties.
You may want to make the organiser also an ATTENDEE but there is no guarantee that this will work.
See Change event description for organizer using VCalendar and When creating an iCal event on behalf of an organizer and email it to him, no "Add to calendar" or "RSVP" wrappers appear
So, you guys are correct and this is expected behavior. I tried adding the organiser as an attendee and ended up running into problems when I tried to create an event cancellation. The organiser would receive the email but be unable to remove from calendar because they were recognized as the organizer.
I ended up abandoning using ICS files and instead started using a library that communicates through Exchange Web Services. EWS allowed me to simulate creating a meeting on someone's calendar through an API and then adding attendees just like I created the meeting in Outlook. Specifically, I was using python so I started using Exchangelib.
I wanted to put an answer to this question for anyone else that may stumble upon this.

Opening ICS file with multiple events creates new calendar in Outlook

I would like to be able to create an ICS file with multiple events that user will be able to import in their default Exchange Calendar. I need to support Outlook desktop client, Office 365 web interface and Apple iPhone Mail/Calendar.
Note that issue only occurs with ICS files that contain multiple events. Single event ICS works as expected.
Following multi-event ICS file:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//bobbin v0.1//NONSGML iCal Writer//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20180327T080000Z
DTEND:20180327T110000Z
DTSTAMP:20091130T213238Z
UID:1285935469767a7c7c1a9b3f0df8003a#yourserver.com
CREATED:20091130T213238Z
DESCRIPTION:Example event 1
LAST-MODIFIED:20091130T213238Z
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Example event 1
TRANSP:OPAQUE
END:VEVENT
BEGIN:VEVENT
DTSTART:20180328T120000Z
DTEND:20180328T130000Z
DTSTAMP:20091130T213238Z
UID:1285935469767a7c7c1a9b3f0df8003b#yourserver.com
CREATED:20091130T213238Z
DESCRIPTION:Example event 2
LAST-MODIFIED:20091130T213238Z
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Example event 2
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
works fine in Office 365 web interface and Apple iPhone Mail/Calendar. However, when it is imported in Outlook 2016 it creates a new "Untitled" Calendar and puts events in it instead of default user calendar.
This seems to be a known issue referenced previously on SO:
ICal import creates new calendar When Open the ics file
Have ICS file with multiple events save to my Calendar, not Other Calendars
Answers range from "it cannot be done" to the opposite.
One of the posts in the first link mentions removing X-WR-CALNAME from ICS fixes the problem. I never had this in ICS to begin with.
Another post on the same page mentions that adding X-WR-RELCALID:XXXXXX fixes it. I tried putting it in and it makes no difference at all. I am not sure if value for X-WR-RELCALID should be set to something specific - I just set it to some GUID.
If someone successfully resolved it - can you post an ICS sample and what version of Outlook did it work with?

How to get ics calendar invitation to automatically add to calendar

I am generating .ics calendar invitation with the node package ical-generator and sending the attachment in an email via mandrill.
The .ics calendar invite contains information for one event at a specific time and date.
example generated file:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//sebbo.net//ical-generator//EN
METHOD:REQUEST
NAME: xxxx Events
X-WR-CALNAME: xxxxx
BEGIN:VEVENT
UID:5wzd#xxx.com
SEQUENCE:0
DTSTAMP:20180318T202459Z
DTSTART:20180330T230000Z
DTEND:20180330T230000Z
SUMMARY:test
LOCATION:test
DESCRIPTION:test
ORGANIZER;CN="info":mailto:info#xxxx.com
END:VEVENT
END:VCALENDAR
Right now, the user receives the calendar invitation as an attachment in the email and is able to add the event to their calendar if they open up the attachment and click on "add to calendar" (in outlook).
What changes do I need to make so that the calendar invite is automatically parsed by the mail client and added to the user's calendar (similar functionality is found in email confirmation from sites like meetup and eventbrite).
Not sure I have the context knowledge around how email clients, calendar systems or .ics files work to have a framework of how to approach this problem
Any suggestions or pointers to resources is greatly appreciated! Thank you!
You need to consider three points in order to add events automatically:
Email Header
iCalendar Method
ATTENDEE information the "VEVENT" calendar component
Email Header
In order to get the email client to parse correctly the attached .ics file, you should add the scheduling method and MIME information to the email headers. This is specified by the iCalendar Message-Based Interoperability Protocol (RFC 2447).
For this reason, your header should include Content-Type,
Content-Transfer-Encoding and Content-Disposition as specified in the following example:
Content-Type: text/calendar; charset=utf-8; method=REQUEST; name=invite.ics'
Content-Transfer-Encoding: Base64
Content-Disposition: attachment; filename=invite.ics
iCalendar Method
When used in a MIME message entity, the value of "METHOD" must be the same as the Content-Type "method". This can only appear once within the iCalendar object. The value of this field is defined by the iCalendar Transport-Independent Interoperability Protocol (iTIP) (RFC 5546).
In order to request for a meeting, the value should be "REQUEST".
METHOD:REQUEST
ATTENDEE information the "VEVENT" calendar component
This property is the state of a particular "Attendee" relative to an event. It is used for scheduling and is defined by the "PARTSTAT" parameter in the "ATTENDEE" property for each attendee.
ATTENDEE;PARTSTAT=ACCEPTED;CN="Jane
Doe";EMAIL=jdoe#gmail.com:MAILTO:jdoe#gmailcom
Here is an example of a minimal .ics file:
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
UID:<unique-id>#<site>.com
DTSTAMP:20210605T073803Z
DTSTART;TZID=America/Guayaquil:20210614T030000
DTEND;TZID=America/Guayaquil:20210614T040000
SUMMARY:My Event
ORGANIZER;CN="Juan Perez":mailto:jperez#organizer.com
ATTENDEE;PARTSTAT=ACCEPTED;CN="Jane
Doe";EMAIL=jdoe#gmail.com:MAILTO:jdoe#gmailcom
URL;VALUE=URI:https://<site>.com/event/5960492994476830083
END:VEVENT
END:VCALENDAR
For more details, please take a look at my gist.
You need two things to get this working:
1) The correct encoding of the attachment in your email, see this email headers:
Content-Disposition: attachment;
filename=meeting.ics
Content-class: urn:content-classes:calendarmessage
Content-Type: text/calendar;
name="meeting.ics";
component="VEVENT"
Content-Transfer-Encoding: 7bit
2) The correct format for the ics file. If you work in PHP to generate the ICS file you should use the library provided from icalendar.org
Try to use this event to test if working and use the validator present in the site mentioned above.
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//ZContent.net//ZapCalLib 1.0//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
SUMMARY:Simple Event
DTSTART:20200101T120000
DTEND:20200101T130000
UID:2020-02-12-11-02-23#demo.icalendar.org
DTSTAMP:20200212T100223
Description:This is a simple event\, using the Zap Calendar PHP library. Vi
sit http://icalendar.org to validate icalendar files.
END:VEVENT
END:VCALENDAR
The best you can do is ensure that the ics file is well setup, with the text/calendar header etc.
The providing system cannot force on the users device how the file is dealt with, it is entirely within the control of the receiver and their device setup.
For example I have my windows pc set to open ics files in a text editor, while my iphone will try to do an add to calendar (the icloud one), but I actually use google calendar. And Gmail used to not automatically add invites unless they'd been sent to the gmail address, whereas I use other domains for personal/family vs work, which all go to gmail. I'm not sure whether that is still a problem. I don't want the auto added.
Depending on the sort of system you developing for, You might want to consider having the recipients subscribe once to a personal ics url, rather than sending individual invites all the time. If subscribed, then future events/classes etc will automatically show up. I love it when systems do that, but too often they don't. EG: classes that one signs up individually for.

iCal4j .ics Alarm/Notifications

I have the following snippet of an .ics file generated by iCal4j:
BEGIN:VCALENDAR
PRODID:-//Events Calendar//iCal4j 1.0//EN
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20110608T161848Z
DTSTART:20110604T213000
DTEND:20110604T222158
SUMMARY:Uplink Window
TZID:Europe/London
UID:20110608T162308Z-uidGen#10.37.129.2
DESCRIPTION:My Description
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20110608T161848Z
DTSTART:20110604T230845
DTEND:20110605T001314
SUMMARY:Uplink Window
TZID:Europe/London
UID:20110608T162309Z-uidGen#10.37.129.2
DESCRIPTION:My Description
END:VEVENT
END:VCALENDAR
When I import this .ics file into Outlook or iCal each event has a notification 15 minutes before the start time (the little popup thing). Is there a way I can disable these notifications? We have hundreds of events per .ics file and don't need to be notified whenever one comes up, we just want to be able to view the blocks of time the events cover.
Thanks
It was a setting of iCal and Outlook to add an automatic notification 15 minutes before any new event. The .ics file was being treated as a new event. Once I changed those settings in the preferences of the respective applications, I got the desired results.
User Error wins again.

Resources