nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.31k stars 4.06k forks source link

[Bug]: outlook calendar events response does not get processed by outlook #40967

Open miqmago opened 1 year ago

miqmago commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

When responding a calendar event sent from outlook calendar, the generated ics file makes outlook to reject it and replace it with a not supported calendar message.ics. The event on outlook calendar does not get confirmed.

original ics file sent by outlook calendar:

BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Romance Standard Time
BEGIN:STANDARD
DTSTART:16010101T030000
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ORGANIZER;CN=Miquel:mailto:someuser@hotmail.com
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Miquel:mai
 lto:invited@example.com
DESCRIPTION;LANGUAGE=es-MX:\n..............................................
 ..........................................................................
 .................\nUnirse a una reunión en línea<https://join.skype.com/
 PH......E7AM>\n...........................................................
 ..........................................................................
 ....\n
UID:040000008...
SUMMARY;LANGUAGE=es-MX:Test resposta
DTSTART;TZID=Romance Standard Time:20231019T100000
DTEND;TZID=Romance Standard Time:20231019T103000
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20231018T161542Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:0
LOCATION;LANGUAGE=es-MX:
X-MICROSOFT-CDO-APPT-SEQUENCE:0
X-MICROSOFT-CDO-OWNERAPPTID:2121963206
X-MICROSOFT-CDO-BUSYSTATUS:TENTATIVE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-ONLINEMEETINGEXTERNALLINK:https://join.skype.com/PH......E7AM
X-MICROSOFT-ONLINEMEETINGINFORMATION:{"OnlineMeetingChannelId":null\,"Onlin
 eMeetingProvider":2}
X-MICROSOFT-DONOTFORWARDMEETING:FALSE
X-MICROSOFT-DISALLOW-COUNTER:FALSE
X-MICROSOFT-REQUESTEDATTENDANCEMODE:DEFAULT
X-MICROSOFT-LOCATIONS:[]
BEGIN:VALARM
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT15M
ACTION:DISPLAY
END:VALARM
END:VEVENT
END:VCALENDAR

Response generated by nextcloud calendar:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.4.2//EN
CALSCALE:GREGORIAN
METHOD:REPLY
BEGIN:VTIMEZONE
TZID:Europe/Paris
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:040000008...
DTSTAMP:20231018T173746Z
SEQUENCE:0
DTSTART;TZID=Romance Standard Time:20231019T110000
DTEND;TZID=Romance Standard Time:20231019T120000
SUMMARY:Test 1
ORGANIZER;CN=Miquel:mailto:someuser@hotmail.com
ATTENDEE;PARTSTAT=ACCEPTED;CN=Miquel:mailto:invited@example.com
END:VEVENT
END:VCALENDAR

Seems that removing TZID on DTSTART and DTEND makes the ics file valid. Also noted that when Gmail is responding to an outlook calendar event, it's sending DTSTART and DTEND similar to isostring:

DTSTART:20231019T090000Z
DTEND:20231019T100000Z

Also Gmail is adding the X-MICROSOFT-CDO fields and does not include the BEGIN:VTIMEZONE, BEGIN:DAYLIGHT and BEGIN:STANDARD. Inside BEGIN:VEVENT section Gmail also adds a STATUS:CONFIRMED field.

Also noted that the email sent by Gmail in outlook appears with an icon on the email marking as a calendar email. When responding from nextcloud, the calendar icon never appears. I think it might be because of the headers of the email, but I could not inspect the headers and compare to the one sent by nextcloud...

image

Steps to reproduce

  1. Create an event with calendar from hotmail.com
  2. Add the event to nextcloud calendar importing ics file in calendar (or via snappymail calendar connector)
  3. Go to calendar and mark the calendar meeting as accepted
  4. Go to outlook web and check the email received from nextcloud calendar response

Expected behavior

Responding to an outlook calendar event should make the event in outlook calendar to process the action (accept/tentative/reject)

Installation method

Community Docker image

Nextcloud Server version

27

Operating system

Debian/Ubuntu

PHP engine version

PHP 7.4

Web server

Nginx

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

thomasmerz commented 6 months ago

I'm not sure if my problem is the same or related to this:

I can for sure subscribe to my (shared and private) Nextcloud calenders in MS Outlook (outlook.office.com as well as Outlook App on MacOS and also shown via Calender on iOS with this account). But every update on my NC calendars are not synchronized to Outlook since an unknown time (weeks, maybe months?)!

I'm 100 percent sure that "before" I also got every update my wife and my kids made in our shared NC calender in my Outlook calender.

Is this really an error/problem in NC or in Outlook (this is not the first and not the only of my many problems in the past with this Outlook calender on MacOS and iOS!)? I will also open an issue with my company account at MS for this.

I'm always on latest stable version due to daily patching/docker-pull.