Microsoft 365 appointment invitations not working
Steps to reproduce
See closed issue 703 at https://github.com/nextcloud/mail/issues/703 Nextcloud mail 4.2.3 still cannot handle calendar invitations send from Microsoft 365 accounts. There is no way to add them to the nextcloud calendar. Even if one tries to use 'create event', it does not handle invitations for recurring events.
Expected behavior
Nextcloud should properly handle invitations.
Actual behavior
There is no way to add events to the calendar. Even when using 'create event', recurring events from 365 cant be added.
Mail app version
No response
Nextcloud version
No response
Mailserver or service
No response
Operating system
No response
PHP engine version
None
Nextcloud memory caching
No response
Web server
None
Database
None
Additional info
No response
hi @Luncheon3462
Can you post a screen capture of the issue?
@SebastianKrupinski I want to respond but do not understand. A screen capture of bug related missing functionality?
@Luncheon3462 a screen shot of what you seen on the screen, with the MS invitaion
@SebastianKrupinski
Hi @Luncheon3462,
Thanks for reaching out.
Is it possible to create an event at your Microsoft 365 instance and invite "[email protected]" and "[email protected]"? That's the easiest way to debug calendar invitations.
@kesselb @SebastianKrupinski Regretfully, I would not be comfortable doing that because of the IT policies in place. I know that is frustrating to you ( and me) since you are trying to help troubleshoot. Other alternatives?
@Luncheon3462 Thank you for the image. That helps.
Can i ask you one more question, do you know if the message was created with Microsoft Outlook Desktop? Or Office 365 Outlook browser edition?
@kesselb I have access to a O365 service and Desktop outlook, I'll send us a message from them.
@SebastianKrupinski the invite for the screenshot was O365 browser. But I've also tried with desktop app (windows) and have same result.
@Luncheon3462 Thank you for confirming
After doing some testing the issue seems to be a malformed trigger duration string in O365 calendar invitations.
The trigger duration is being generated a "TRIGGER;RELATED=START:P" without a time which causes a crash in the event parser as the duration should contain at least on one time indicator, like this "TRIGGER;RELATED=START:P0S".
What is interesting to me is that the snappymail app for nextcloud renders the same invitation properly and I can add it to my choice of calendars. I don't code, but wonder why, if the bug is within O365, that snappymail in nextcloud would not be impacted, but the stock necxtcloud mail app is.
@Luncheon3462
Snappy mail has probably come across this issue and made a hacky patch as a work around, because it can take year to get MS to change their software.
https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.6
The above RFC clearly states that the P should be followed by a value.
dur-value = (["+"] / "-") "P" (dur-date / dur-time / dur-week)
dur-date = dur-day [dur-time]
dur-time = "T" (dur-hour / dur-minute / dur-second)
dur-week = 1*DIGIT "W"
dur-hour = 1*DIGIT "H" [dur-minute]
dur-minute = 1*DIGIT "M" [dur-second]
dur-second = 1*DIGIT "S"
dur-day = 1*DIGIT "D"
tagging @the-djmaze who maintains snappymail in case he can opine. @SebastianKrupinski where does that leave nextcloud mail users? I can report to MS, but they don't care. Is there an easy/hacky interim fix?
where does that leave nextcloud mail users?
We are working on a work around.
Just wanted to update everyone, we have a fix for this in Mail 4.3 and will be applying it to 4.2 also.
Hi @Luncheon3462,
Mail 4.2.5 (released 2025-03-12) ships a fix to handle invitations with an invalid trigger value more carefully.
Please let us know if that resolves the issue for you.
If not, then please open the message source of the email and look for the block with "Content-Type: text/calendar; method=REQUEST". Please replace sensitive data and then share content with us.
Example:
I'm using Mail 4.2.5 and the new calendar invite looks identical to the screenshot i posted earlier. I went to the three dot menu and selected 'more actions' and then selected 'view source'. It looks like the x-header of the invite. No section or block with block with "Content-Type: text/calendar; method=REQUEST". No text that looks anything like your example.
Accessing the same calendar invite in nextcloud via the snappymail app continues to work properly. It sees it as a meeting invite and allows me to add to any of my nextcloud calendars.
What else can I do to help troubleshoot?
I'm using Mail 4.2.5 and the new calendar invite looks identical to the screenshot i posted earlier. I went to the three dot menu and selected 'more actions' and then selected 'view source'. It looks like the x-header of the invite. No section or block with block with "Content-Type: text/calendar; method=REQUEST". No text that looks anything like your example.
Accessing the same calendar invite in nextcloud via the snappymail app continues to work properly. It sees it as a meeting invite and allows me to add to any of my nextcloud calendars.
What else can I do to help troubleshoot?
Can you post or send me the invitation directly. [email protected]
@SebastianKrupinski Nextcloud mail is not seeing the .ics attachment. Snappymail is seeing it. I'm not sure I can send you the invite because of corporate policies, but if i get permsision to do so, i need you to avoid referencing any domains, etc. here.
For what it is worth, I had someone from a different business, that also uses 365, send a calendar invite. Same result. I just wanted to rule out that it was something my employer had configured that was causing the issue. Seems that is not the cause.
Ios mail app also sees the invite properly.
@Luncheon3462
If you send the invitation to my email address it will NOT be made public. We handle sensitive data for clients all the time.
Also, can you download the actual email(s) and send them as a attachment, (do not forward them). This will preserve the original information.
@SebastianKrupinski Sorry for being obtuse. Do I need to send the invite from the O365 account or can i forward it from the non-365 email account i use with Nextcloud?
@Luncheon3462 you can send it from any account, but it needs to be an attachment. So you can download it from your other account and attach it to the email you are sending as <filename.eml>
@SebastianKrupinski Sorry for the delay. I finally was able to get to this.
I sent you an email with the source email attached and the calendar invite .ics. I think all you needed was the .eml, but I am a noob and wanted to make sure everything i had you had.
I used a new calendar invite from the same source O365 account. This time, instead of sending it to an email address i used that is hosted by provider A, I used an email address hosted by Provider B
Same result, as you can see from the .png screenshot.
Thank you.
@Luncheon3462
Thank you I got your email with the attachments, will let you know what I discover
@SebastianKrupinski Thank you
Ignore my last message, that was a false assumption on my part.
@Luncheon3462 does the mail account you are trying to view the invitation on have the same email address as one of the attendees or organizer?
We do not display the invitation controls on two conditions,
A. If the email address on the mail account does not match any of the attendees B. If the event is in the past.
@SebastianKrupinski
When I made the calendar event, it was scheduled in the future.
The calendar event was made with a Microsoft 365 Account/email. Lets call that Email Address 1. The invitation was sent to a non-Microsoft 365 Account/email. Lets call that Email Address 2. I viewed the calendar invitation using the inbox for Email Address 2, which was configured to use your Nextcloud Mail App (via IMAP).
Does that help?
For what is it worth, I've tried this same setup using a different email address, lets call that Email Address 3, which is hosted by a different provider than Email Address 2. Neither Email Address 2 or Email Address 3 are microsoft 365 accounts. All of the calendar event invitations are viewed in Nextcloud Mail.
@Luncheon3462 okay, the mail provider is not the issue, its the email address.
So did you forward the invitation from Email 1 to Email 2 or 3? Or did you invite Email 2 or 3 as an participant of the event?
Basically if your mail account in NC is [email protected] but the invitation does NOT contain an attendee (person invited) with an email address of [email protected] then the invitation control will not show.
@SebastianKrupinski
I invited email 2 as a participant of the event. I retrieved that invitation in Nextcloud Mail using email 2's IMAP credentials. I invited email 3 as a participant of a different event. I retrieved that invitation in Nextcloud Mail using email 3's IMAP credentials.
For what it is worth, I have a different email address than email 2 or email 3 in the NC user settings->personal info (located at mydomain.com/settings/user). However, that email address is NOT configured in NC Mail.