Microsoft图形 - 为什么需要根网站读取访问权限才能访问另一个网站集中的子网站?



我正在尝试访问作为嵌套子网站一部分的列表的项目,如下所示:

https://{mytenant}.sharepoint.com/
vendorSiteCollection/
vendorAppSite/
vendorList

我的测试用户vendorAppSite子网站只有读取权限。我已经删除了所有其他网站的读取权限,包括https://{mytenant}.sharepoint.com上的root网站集。

如果我在浏览器中导航到此处:

https://{mytenant}.sharepoint.com/sites/{vendorSiteCollection}/{vendorAppSite}/Lists/{vendorList}/AllItems.aspx

然后我看到了列表,正如预期的那样。

但是,当我在图形资源管理器中提出此请求时:

https://graph.microsoft.com/v1.0/sites/root:/sites/{vendorSiteCollection}/{vendorAppSite}:/lists/{vendorList}?$expand=items($expand=fields)

我收到 403 禁止响应:

{
"error": {
"code": "accessDenied",
"message": "The caller does not have permission to perform the action.",
"innerError": {
"request-id": "15e2087d-8ae5-46e3-abee-4ab165629dfb",
"date": "2018-04-05T12:08:16"
}
}
}

我希望能够通过 API 读取列表项,就像我可以在 SharePoint Online UI 中看到列表项一样。

当权限级别设置如下时,如何使用Microsoft图形 API 读取项目?

旁注:当测试用户对root的网站集具有读取权限时,https://{mytenant}.sharepoint.comAPI 将按预期工作。但此解决方法对我们不起作用,因为我们不希望用户对root网站集具有读取访问权限。

此问题似乎已在 MS 图中修复。

最新更新