microsoft-graph-api - Microsoft Graph - 为什么访问另一个网站集中的子网站需要根网站读取权限?

标签 microsoft-graph-api sharepoint-online

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

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

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

如果我在浏览器中导航到这里:
https://{mytenant}.sharepoint.com/sites/{vendorSiteCollection}/{vendorAppSite}/Lists/{vendorList}/AllItems.aspx
然后我看到了列表,正如预期的那样。

但是,当我在 Graph Explorer 中发出此请求时:
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 Graph API 读取项目?

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

最佳答案

这个问题似乎在 MS Graph 中得到解决。

关于microsoft-graph-api - Microsoft Graph - 为什么访问另一个网站集中的子网站需要根网站读取权限?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49672387/

相关文章:

azure - 如果我们将 `DisableCustomAppAuthentication` 设置为 true,如何针对 SharePoint Online 验证我们的 .NET 控制台应用程序

c# - 使用 CSOM C# 创建网站集时出现错误值不能为空。参数名称 : source

c# - 如何将 “ContentType= {image/jpeg}” 的响应保存为图像 C#?

java - 无法通过 Microsoft Graph Rest API 在 Onedrive 上创建文件

excel - 图表 Excel REST API - Azure AD 2.0 端点 - 是否支持 OneDrive 个人版?

microsoft-graph-api - 获取具有由外接程序设置的自定义属性的事件

c# - 如何筛选使用 Microsoft Graph 查询的 Sharepoint 列表项

arrays - 使用数组将 SharePoint Online 列表转换为 JSON

sharepoint - SharePoint 开发人员学习 React.js 和 Typescript 有好处吗?

sharepoint - 通过linkedIn API 读取公司提要