我有一个完全构建的 API,可以将任务创建到 MS Teams“计划者和待办事项的任务”中。
使用的 MS 实际图形 API POST
https://graph.microsoft.com/v1.0/planner/tasks
示例 API:
{
"routeId": "7fcxxxxx-xxxx-xxxx-xxxx-5d35838xxxxx",
"userId": "77cxxxxx-xxxx-xxxx-xxxx-5f09858xxxxx",
"tenantId": "dcdxxxxx-xxxx-xxxx-xxxx-31002a1xxxxx",
"title": "Task: Add you task title",
"hospitalAssignment": null,
"percentComplete": 0,
"createdTimestamp": "2021-04-20T01:51:49Z",
"startDateTimestamp": "2021-04-20T18:10:15Z",
"dueDate": "2021-11-20T11:47:33.000Z",
"Notes": "Add some useful notes here",
"checklistItems": [
{
"title": "itema"
},
{
"title": "itemb"
}
],
"attachments": [
{
"url": "https://www.google.com",
"alias": "link"
},
{
"url": "https://teams.microsoft.com/file/....",
"alias": "Test Document 1"
},
{
"url": "https://random.sharepoint.com/sites/...",
"alias": "Test Document 2"
},
],
"comments": "null,",
"priority": null
}
点击上面的 API 在计划器中创建一个任务,如下所示
所以,这里有一个问题——当我尝试点击它时,link
它把我带到了浏览器并打开,google
这很好。现在,当我点击Test Document 1
或Test Document 2
它分别抛出一个unknown error
和Sorry, something went wrong
。
之后,我手动创建了任务并从中添加附件Add Attachment
并将链接粘贴到那里,然后单击文件工作并打开文档。