What does this PR do?

  • Fixes #14765
  • Fixes CAL-3446 /claim #14765

Visual Demo (For contributors especially)

Video Demo:

Before fix (or issue): https://www.loom.com/share/87082087c5f64e368494ec6aea834a48?sid=4c3724fa-5c6a-4a57-8b25-d32e6989404d

After fix : https://www.loom.com/share/75f976cf3b6f4b27b5da3301089fb2fd?sid=fe926a95-9953-4797-a7f0-bc6524f35c83

Changes in /apps/msteams (MSTeams installation page with dependency added) https://www.loom.com/share/2881ab3bf573453585a029016c82b3ba?sid=478b4496-9112-43b0-a3db-f6050a2baaf3

Image Demo :

  • Add side-by-side screenshots of the original and updated change.
Before Fix After Fix
Screenshot 2025-05-17 at 9 53 17 PM Screenshot 2025-05-17 at 9 28 23 PM
Screenshot 2025-05-17 at 9 54 20 PM Screenshot 2025-05-17 at 9 29 35 PM
Screenshot 2025-05-20 at 12 36 02 AM Screenshot 2025-05-20 at 12 34 58 AM
Screenshot 2025-05-17 at 11 13 59 PM This endpoint does not create an onlineMeeting. For MSTeam event to look as onlineMeeting it should be associated with an event or in other words it should be created using `/events` endpoint as recommended here

https://learn.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0&tabs=javascript#example-4-create-and-enable-an-event-as-an-online-meeting

with key properties set allowNewTimeProposals: true , isOnlineMeeting: true, onlineMeetingProvider: 'teamsForBusiness'

  • Also duplicate events or emails were generated because a event was created on outlook calendar using calendar service, and /onlineMeetings also created an event on same calendar by office365video/lib/VideoApiAdapter.

  • Implemented a check in this PR -> to not create meeting using office365video/lib/videoApiAdapter, but the office365calendar/lib/CalendarService with /events endpoint will be used to create onlineMeeting by passing required parameters..

  • Also the body content should be of type HTML and html content has to be input in body for /event endpoint , for the texts and content to look good along with Microsoft Teams details at the end of the body with meeting details. This resolves content not looking good.

  • MSTeams automatically send mails to attendees with the body passed in /events endpoint. Also appending its meeting details like url, passcode, id,…

  • Added a dependency to MSTeams installation in app-store, this suggests or warns user if they are trying to install MSTeams without outlook calendar and recommends to install outlook calendar first.

  • Also updated the updateEvent in office365calendar/lib/CalendarService.ts updateEvent updates or moves the meeting without loosing its onlineMeeting feature by getting the meeting blob first in the existing body and then patching it. Without this blob patch the updated meeting becomes non-onlineMeeting (or without msTeams feature) https://learn.microsoft.com/en-us/graph/api/event-update?view=graph-rest-1.0&tabs=javascript

Screenshot 2025-05-17 at 11 42 19 PM

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • - N/A - I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works. This functionality test requires verification on external app - MSTeams and can be verified visually.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have? Install Microsoft outlook calendar and MS teams with a work account for a organizer in cal
  • What is expected (happy path) to have (input and output)? The events on MS teams should be created as online meetings. The text should be formatted correctly inside this event on MS teams. The buttons ‘Join’ , label ‘Microsoft Teams Meeting’ for location should be visible. It should be marked as online meeting when event is opened to edit. Should be able to reschedule and the rescheduled event should also be ‘online meeting’.
  • Any other important info that could help to test that PR

Summary by mrge

Fixed an issue where MS Teams events were not created as online meetings and prevented duplicate calendar events in Outlook when using MS Teams.

  • Bug Fixes
    • Ensured MS Teams events are always marked as online meetings with correct formatting and join links.
    • Skipped creating duplicate Outlook calendar events when a Teams meeting is already created.

Claim

Total prize pool $500
Total paid $0
Status Pending
Submitted May 17, 2025
Last updated May 17, 2025

Contributors

VI

Vijay

@vijayraghav-io

100%

Sponsors

CA

Cal.com, Inc.

@cal

$500