如何通过MS Graph以房间为位置创建事件?

问题描述 投票:0回答:2

我正在尝试通过 MS Graph to Calendar 创建一个事件,其中的空间已在我的 Outlook 帐户中设置。 但问题是,如果不将房间添加为与会者,就无法预订房间。

如果我只添加房间作为位置,房间帐户中的日历将不会收到通知和预订。

{
  "subject": "Let's go picnicking",
  "body": {
    "contentType": "HTML",
    "content": "Does late morning work for you?"
  },
  "start": {
      "dateTime": "2018-03-20T12:00:00",
      "timeZone": "Pacific Standard Time"
  },
  "end": {
      "dateTime": "2018-03-20T14:00:00",
      "timeZone": "Pacific Standard Time"
  },
  "location":{
      "coordinates": {"@odata.type": "microsoft.graph.outlookGeoCoordinates"},
      "displayName":"RM.Papaya",
      "locationType": "conferenceRoom",
      "address": {"@odata.type": "microsoft.graph.physicalAddress"}
  },
  "locations": [
        {
            "displayName": "RM.Papaya",
            "locationType": "conferenceRoom"
        }
    ],
  "attendees": [
    {
      "emailAddress": {
        "address":"[email protected]",
        "name": "Matthew Liao"
      },
      "type": "required"
    }
  ]
}

但是,如果我将房间也添加为位置和与会者,则会通知房间帐户中的日历,但位置的显示只是与房间帐户无关的文本。

{
  "subject": "Let's go picnicking",
  "body": {
    "contentType": "HTML",
    "content": "Does late morning work for you?"
  },
  "start": {
      "dateTime": "2018-03-20T12:00:00",
      "timeZone": "Pacific Standard Time"
  },
  "end": {
      "dateTime": "2018-03-20T14:00:00",
      "timeZone": "Pacific Standard Time"
  },
  "location":{
      "displayName":"RM.Papaya",
      "locationType": "conferenceRoom",
      "address": {"@odata.type": "microsoft.graph.physicalAddress"}
  },
  "locations": [
        {
            "displayName": "RM.Papaya",
            "locationType": "conferenceRoom"
        }
    ],
  "attendees": [
    {
      "emailAddress": {
        "address":"[email protected]",
        "name": "Matthew Liao"
      },
      "type": "required"
    },
    {
      "emailAddress": {
        "address":"[email protected]",
        "name": "RM.Papaya"
      },
      "type": "required"
    }
  ]
}

这合理或符合逻辑吗? 或者我的代码有什么错误吗? 谢谢你的帮助。

calendar office365 microsoft-graph-api
2个回答
0
投票

显示问题是 API 的限制。这是我们希望解决的问题,但我无法冒险猜测这种情况何时会发生。


0
投票
location: {   
  displayName: <your Room name>,   
  locationEmailAddress: <your Room emailAddress>,   
  locationType: 'conferenceRoom' 
}

这对我来说是工作

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.