在 Microsoft Graph 中创建线程

Creating a thread in Microsoft Graph

我正在使用 Fiddler 为我的对话创建一个新话题,并且我正在按照文档 here 进行操作,但我收到了这个错误:

message="Posts" property missing in create conversation request body.

真正奇怪的是我使用的是文档中的请求模型。

POST https://graph.microsoft.com/v1.0/groups/<id>/conversations/<id>/threads
Content-type: application/json
Content-length: 419

{
  "toRecipients": [
    {
      "emailAddress": {
        "name": "name-value",
        "address": "address-value"
      }
    }
  ],
  "topic": "topic-value",
  "hasAttachments": true,
  "lastDeliveredDateTime": "datetime-value",
  "uniqueSenders": [
    "uniqueSenders-value"
  ],
  "ccRecipients": [
    {
      "emailAddress": {
        "name": "name-value",
        "address": "address-value"
      }
    }
  ]
}

我明白帖子 属性 显然不见了,但是这个 属性 应该放在哪里?

像这样,

  "topic": "topic-value",
  "Posts": "This is a post"     <<<
  "hasAttachments": true,

没有工作并抛出以下错误消息:

"message": "Property Posts in payload has a value that does not match schema."

非常感谢您对此问题的意见。

非常感谢!

编辑: 将以下内容添加到示例模型中,我能够创建一个新线程: "posts": [{}]

基本上我使用了相同的模型,但是添加了一个帖子属性并且我设法创建了一个新线程:

{
  "toRecipients": [
    {
      "emailAddress": {
        "name": "name-value",
        "address": "address-value"
      }
    }
  ],
  "topic": "topic-value",
  "hasAttachments": true,
  "lastDeliveredDateTime": "datetime-value",
  "uniqueSenders": [
    "uniqueSenders-value"
  ],
  "posts": [{}],   <<<< HERE, empty post
  "ccRecipients": [
    {
      "emailAddress": {
        "name": "name-value",
        "address": "address-value"
      }
    }
  ]
}

我假设帖子的组成是: "posts": [{ "body": { "contentType": "html", "content": "this is body content" },

希望以后能对其他人有所帮助。