Teams Recurring Meeting Update Issue with Graph API

未关闭
#1,857 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
领域
api

调研方向

Start with the Microsoft Graph /me/events endpoint and the PATCH URL construction shown in the Node.js snippet, comparing eventId with instanceId. Reproduce the sequence of updating the series, updating one recurring instance, and updating the series again. Done would require identifying the source of the 500 response and documenting or confirming the supported update behavior; no repository file or test is mentioned.

由索引模型根据 Issue 内容生成。

描述

status:waiting-for-triage

I successfully created a recurring Teams meeting using the Graph API.
After that, I updated the entire recurring series using the Graph API, which worked successfully.
I then tried updating a single instance of the recurring series using the Graph API, and that also succeeded.

However, once I update any single instance of the recurring series, any subsequent attempt to update the entire recurring series results in a 500 Internal Server Error from the Graph API.

Below is the code snippet I’m using to update the meeting in Node.js:

process.env.teamsScheduleMeeting = "https://graph.microsoft.com/v1.0/me/events"

const headers = {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json',
    'Prefer': `outlook.timezone="${payload?.timezone ? payload?.timezone : payload.booking.timezone}", outlook.body-content-type="text"`
};

const meetingData = {
    ...(payload?.title && { subject: payload?.title }),
    ...(payload?.startTime && payload?.endTime && payload?.timezone && {
        start: {
            dateTime: new Date(Number(payload?.startTime)).toISOString(),
            timeZone: payload?.timezone
        },
        end: {
            dateTime: new Date(Number(payload?.endTime)).toISOString(),
            timeZone: payload?.timezone
        }
    }),
    ...(payload?.recurrence && { recurrence: payload.recurrence }),
    ...(payload?.participants && Array.isArray(payload?.participants) && {
        attendees: payload.participants.map(email => ({ emailAddress: { address: email } }))
    })
};

const teamsMeetingUpdateUrl = `${process.env.teamsScheduleMeeting}/${payload.type === "recurringInstance" ? payload.instanceId : payload.eventId}`;

const existingEventDetails = await axios.get(teamsMeetingUpdateUrl, { headers });
const existingContent = existingEventDetails?.data?.body?.content;

if (payload?.description) {
    // Update the body content only if a new description is provided
    meetingData.body = {
        contentType: 'text', // Retain original or default to text
        content: existingContent.replace(/^(.*?)(\r\n|$)/, `${payload.description}$2`) // Replace first line with the new description
    };
}

const updateEvent = await axios.patch(teamsMeetingUpdateUrl, meetingData, { headers });
console.log('updateEvent---', updateEvent);

Can some one help me understand why the Graph API fails with a 500 error when updating the entire series after modifying a single instance?

主要语言
TypeScript
星标
833
派生
240
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoftgraph/msgraph-sdk-javascript 的其他 Issue

查看 microsoftgraph/msgraph-sdk-javascript 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。