Skip to content

Scheduling infrastructure for absolutely everyone.

fix: Request permissions to allow events to be created on shared Office365/Outlook calendars (#17760)

Toon Toetenel1680cba5a55f
diff --git a/packages/app-store/office365calendar/api/add.ts b/packages/app-store/office365calendar/api/add.ts
index fd7ca5849f5..029180b59c0 100644
--- a/packages/app-store/office365calendar/api/add.ts
+++ b/packages/app-store/office365calendar/api/add.ts
@@ -6,7 +6,7 @@ import { WEBAPP_URL_FOR_OAUTH } from "@calcom/lib/constants";
import getAppKeysFromSlug from "../../_utils/getAppKeysFromSlug";
import { encodeOAuthState } from "../../_utils/oauth/encodeOAuthState";
-const scopes = ["User.Read", "Calendars.Read", "Calendars.ReadWrite", "offline_access"];
+const scopes = ["User.Read", "Calendars.Read", "Calendars.ReadWrite", "Calendars.ReadWrite.Shared", "offline_access"];
let client_id = "";
diff --git a/packages/app-store/office365calendar/lib/CalendarService.ts b/packages/app-store/office365calendar/lib/CalendarService.ts
index ff3951f1aa0..46ccd45c874 100644
--- a/packages/app-store/office365calendar/lib/CalendarService.ts
+++ b/packages/app-store/office365calendar/lib/CalendarService.ts
@@ -76,7 +76,7 @@ export default class Office365CalendarService implements Calendar {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
- scope: "User.Read Calendars.Read Calendars.ReadWrite",
+ scope: "User.Read Calendars.Read Calendars.ReadWrite Calendars.ReadWrite.Shared",
client_id,
refresh_token: refreshToken,
grant_type: "refresh_token",