Fix: MS Teams + MS Calendar Bad Implementation

This PR fixes issue #14765 - MS Teams + MS Calendar Bad Implementation.

/claim #14765

Problem

Microsoft Teams meetings created through Cal.com were not being properly integrated with Microsoft Outlook Calendar. Specifically:

  1. Calendar invites were not properly formatted as Teams meetings
  2. The Teams meeting link was just added as text in the description or location
  3. This resulted in unprofessional-looking invitations and poor user experience
  4. Attendees received two separate emails (one from Cal.com and one from MS Calendar)

Solution

The fix involves two key changes:

  1. In office365video/lib/VideoApiAdapter.ts:

    • Improved the createMeeting method to properly format Teams meeting data
    • Added additional metadata to help with calendar integration
    • Removed unnecessary console.log statements
    • Added better error handling
  2. In office365calendar/lib/CalendarService.ts:

    • Modified the translateEvent method to properly set Microsoft Graph API properties for Teams meetings:
      • Added isOnlineMeeting: true
      • Set onlineMeetingProvider: "teamsForBusiness"
      • Added onlineMeeting: { joinUrl: event.videoCallData.url }
      • Properly formatted the location as a virtual Teams meeting

Testing

I’ve tested this fix with both personal and work Microsoft accounts. The calendar invites now:

  • Show properly as Teams meetings in Outlook
  • Have the Teams meeting join button directly in the calendar event
  • Look professional and consistent with native Teams meeting invites
  • Match the expected behavior shown in the issue screenshots

References

This implementation follows Microsoft’s best practices for creating online meetings via the Graph API:

Fixes #14765

Claim

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

Contributors

MI

Mizokuiam

@Mizokuiam

100%

Sponsors

CA

Cal.com, Inc.

@cal

$500