【发布时间】:2019-03-11 08:24:24
【问题描述】:
我正在尝试通过 Microsoft Graph 以编程方式将 SharePoint Library 选项卡添加到 Microsoft 团队频道。
这是我通过 Graph Explorer POST发送的有效负载
{
"teamsAppId": "com.microsoft.teamspace.tab.files.sharepoint",
"name": "Documents3",
"sortOrderIndex": "10300",
"configuration": {
"siteUrl": "https://baywet.sharepoint.com/sites/customerhub",
"libraryServerRelativeUrl": "/sites/customerhub/Shared Documents",
"selectedDocumentLibraryTitle": "Documents",
"selectedSiteTitle": "customerhub",
"dateAdded": "2018-10-05T16:56:59.169Z"
}
}
我收到 201 状态响应,我的标签已添加到频道中。 但是,每当有人尝试从 Teams UI 上传文件时,他们都会收到以下错误消息 The File {filename} is missing。如果他们点击Open in SharePoint然后上传文件,它就可以工作。
如果我与通过 UI 创建的选项卡(正常工作)进行比较,这是我得到的描述。
{
"id": "a68e34db-9d43-4821-953b-2dec938ce785",
"name": "Document%20Library",
"teamsAppId": "com.microsoft.teamspace.tab.files.sharepoint",
"sortOrderIndex": "10200",
"webUrl": "https://teams.microsoft.com/l/channel/19%3ab2e05a0aae42487485b13e088d5d2f0f%40thread.skype/tab%3a%3aa63916e6-f252-477d-9696-7934980e7e47?label=Document%2520Library&groupId=71ed6a2e-67ca-4930-a3c2-abb25ca29fbf&tenantId=bd4c6c31-c49c-4ab6-a0aa-742e07c20232",
"configuration": {
"entityId": null,
"contentUrl": null,
"removeUrl": null,
"websiteUrl": null,
"siteUrl": "https://baywet.sharepoint.com/sites/customerhub",
"libraryServerRelativeUrl": "/sites/customerhub/Shared Documents",
"libraryId": "706FAD5678484E7B93B0855E52A0BCD9",
"selectedDocumentLibraryTitle": "Documents",
"selectedSiteImageUrl": "https://baywet.sharepoint.com/sites/customerhub/_api/GroupService/GetGroupImage?id='f9d430ca-4de3-42f1-9474-1427bfdb16b0'&hash=636743460492415245",
"selectedSiteTitle": "customerhub",
"dateAdded": "2018-10-05T16:56:59.169Z"
}
}
唯一的区别是libraryId 配置值。 (您不应该发送 webUrl 和 id)。
此库 ID 与 SharePoint 中的库 ID 或图表中的驱动器项 ID 不匹配,所以我的问题是:我应该为 libraryId 设置什么值? 我还有什么遗漏的吗?
【问题讨论】:
-
我想让你知道我们正在调查这个问题,一旦我们弄清楚了就会通知你。
标签: microsoft-graph-api microsoft-teams