在Microsoft团队中使用主题

时间:2018-09-17 15:43:52

标签: microsoft-graph

我目前正在尝试通过Microsoft Graph API创建Microsoft团队线程(在通道内)。 我希望线程具有主题/标题,并且正在发送以下请求(来自图形浏览器)
POST https://graph.microsoft.com/beta/teams/{teamId}/channels/{channelId}/chatThreads
具有以下有效负载

{
    "rootMessage": {
        "body": {
            "contentType": 1,
            "content": "<h1>Hello world</h1>"
        },
        "subject": "Welcome Aboard!"
    }
}

但是,如以下屏幕截图所示,创建的线程没有任何标题。 chat thread with no subject 因此,问题是:如何使用Microsoft Graph API中的主题创建聊天线程?

编辑:这是我为消息“来自团队的标题”(从UI创建)获得的有效负载,注释包含一个subject属性。

{
            "replyToId": null,
            "etag": "1537198542791",
            "messageType": "message",
            "createdDateTime": "2018-09-17T15:35:42.791Z",
            "lastModifiedDateTime": null,
            "deleted": false,
            "subject": "title from teams",
            "summary": null,
            "importance": "normal",
            "locale": "en-us",
            "id": "1537198542791",
            "from": {
                "application": null,
                "device": null,
                "user": {
                    "id": "c2e8df37-c6a7-4d88-89b1-feb4f1fda7c5",
                    "displayName": "Vincent Biret",
                    "identityProvider": "Aad"
                }
            },
            "body": {
                "contentType": "text",
                "content": "wvwvwevw"
            },
            "attachments": [],
            "mentions": [],
            "reactions": []
        }

1 个答案:

答案 0 :(得分:0)

Microsoft Teams中的帖子没有“主题”。这些是聊天线程,而不是电子邮件线程。唯一的内容是body

{
  "rootMessage": {
      "body": {
        "contentType": 1,
        "content": "<h1>Hello world</h1>"
      }
  }
}