【问题标题】:Create Event linked to Team Channel - Microsoft Api Graph创建链接到团队频道的事件 - Microsoft Api Graph
【发布时间】:2020-12-23 16:42:21
【问题描述】:

我正在尝试在日历中创建一个活动,以模拟直接在 Microsoft Teams 上创建的活动。因此,基本上,当您通过 Microsoft Teams 创建活动时,您可以指定必须参与活动的组和频道。
我正在使用正确的端点:https://docs.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0&tabs=http
这是我作为发布请求传递的信息:

{
    subject:"Event Subjct",
    isOrganizer: true,
    start: {
        dateTime:"2020-12-29T12:00:00",
        timeZone:"Pacific Standard Time"
    },
    end: {
        dateTime:"2020-12-29T14:00:00",
        timeZone:"Pacific Standard Time"
    },
    isAllDay: false,
    allowNewTimeProposals: true,
    isOnlineMeeting: true,
    attendees: {
        {
            emailAddress: {
                address:"<groupName@emailaddress.ext>", <-- got directly from Azure
                name:"<TeamGroupName>"
            },
            type:"required"
        }
    },
    hideAttendees: false,
    type: "singleInstance",
    transactionId: "<UNIQUE_ID>",
    onlineMeetingProvider: "teamsForBusiness"
}

注意:<..> 之间的所有值都是占位符。

活动已正确创建,但在参加者字段中指定的团队频道组没有参考。我已经搜索了参加者数组的定义,并且在参加者集合中没有任何具体要注意的组+频道:https://docs.microsoft.com/en-us/graph/api/resources/attendee?view=graph-rest-1.0

有什么帮助吗?
谢谢

【问题讨论】:

标签: calendar microsoft-graph-api microsoft-teams


【解决方案1】:

您需要使用following API call to create the event in the Groups。例如,您需要使用:

POST https://graph.microsoft.com/v1.0/groups/01d4ee64-15ce-491e-bad1-b91aa3223df4/events
Content-type: application/json

 {
  "subject": "Let's go for lunch",
  "body": {
    "contentType": "HTML",
    "content": "Does late morning work for you?"
  },
  "start": {
      "dateTime": "2019-06-16T12:00:00",
      "timeZone": "Pacific Standard Time"
  },
  "end": {
      "dateTime": "2019-06-16T14:00:00",
      "timeZone": "Pacific Standard Time"
  },
  "location":{
      "displayName":"Harry's Cafe"
  },
  "attendees": [
    {
      "emailAddress": {
        "address":"adelev@contoso.onmicrosoft.com",
        "name": "Adele Vance"
      },
      "type": "required"
    }
  ]
}

【讨论】:

  • 嗨@Dev。我也在尝试在团队频道中创建活动,请提供解决方案
猜你喜欢
  • 2021-05-22
  • 1970-01-01
  • 2020-05-10
  • 1970-01-01
  • 1970-01-01
  • 2020-10-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多