获取 SharePoint Online 中文档库的角色继承状态

问题描述 投票:0回答:2

我通过 Microsoft Graph API(

/drives
调用)使用 SharePoint Online 驱动器(文档库)。使用此 API,我可以下载/上传文件,但无法使用权限。

这不是问题 - 我可以使用 SharePoint Online REST API 来完成此操作(通过调用

_api/web/GetListByTitle('Title')/hasuniqueroleassignments
)。

这里的主要问题是匹配来自 MS Graph API 的驱动器和来自 SharePoint REST API 的相应列表。现在我按标题匹配,但我有几个例子,当 MS Graph API 中的

name
字段等于“OneDrive”,但
List
实体中的标题是
Shared Pictures

有什么方法可以更精确地匹配 Graph API 和 SharePoint REST API 中的实体吗?

microsoft-graph-api sharepoint-online sharepoint-rest-api
2个回答
0
投票

Drive Item 对象具有 SharePointIds 属性,该属性将提供调用 SharePoint REST API 所需的信息。

https://learn.microsoft.com/en-us/graph/api/resources/sharepointids?view=graph-rest-1.0


0
投票

使用列表资源,可以获得列表id。

然后使用id调用rest api。

/_api/web/Lists(guid'54ca94c0-364e-4201-8fe7-a4c804769009')/hasuniqueroleassignments
© www.soinside.com 2019 - 2024. All rights reserved.