【发布时间】:2019-11-01 02:11:27
【问题描述】:
如何使用 Microsoft Graph API Explorer 获取 Microsoft SharePoint SiteID。
最初我尝试使用以下 API 我能够获取站点 ID
https://graph.microsoft.com/v1.0/sites/tenantName.sharepoint.com:/sites/TestSite:/drives?select=name,id
共享点网址:
https://tenantName.sharepoint.com/sites/TestSite
我得到的输出是:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#drives",
"value": [
{
"id": "b!l17-JY9YT67Qp-2TBvsUupBLMUF2SrJHp5VylCDZThT7HpCdF-7uQ6NTp6t-MbR5",
"name": "Documents"
}
]
}
但是,当我尝试使用通信站点时
谁的 SharePoint URL 是:
https://tenantName.sharepoint.com/SitePages/DevHome.aspx
图形资源管理器 API
https://graph.microsoft.com/v1.0/sites/tenantName.sharepoint.com:/SitePages/DevHome:/drives?select=name,id
我遇到以下错误:
{
"error": {
"code": "itemNotFound",
"message": "The provided path does not exist, or does not represent a site",
"innerError": {
"request-id": "8329dfca-c63b-4af5-80b8-75f26be9e2e8",
"date": "2019-10-31T13:18:33"
}
}
}
【问题讨论】:
标签: sharepoint microsoft-graph-api