MS Graph API - 没有用户/<userid>/驱动器/项目/<itemid>/子项/<childrenid>/权限端点

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

我可以成功获得驱动器的共享权限,如下所示:

获取https://graph.microsoft.com/v1.0/users/{userid}/drive/items/{itemid}/permissions

这为我提供了“grantedToV2”信息,其中包括有关此项目已与谁共享的信息:

        "grantedToV2": {
            "user": {
                "@odata.type": "#microsoft.graph.sharePointIdentity",
                "displayName": "USER NAME",
                "email": "USER EMAIL",
                "id": "USER ID"
            }

我还可以成功获取该驱动器项目的子项,例如具有此请求的文件夹中的所有图像(如果该项目是文件夹):

获取https://graph.microsoft.com/v1.0/users/{userid}/drive/items/{itemid}/children

但是,我正在努力获取子项目的权限 - 我尝试过以下方法:

- GET https://graph.microsoft.com/v1.0/users/{userid}/drive/items/{itemid}/children/{childid} 有/没有权限参考,因为 {childid} 不是可选择的端点

但这些都不存在。

我还能如何获取子项目的“grantedToV2”信息?

非常感谢任何帮助!

microsoft-graph-api sharepoint-online onedrive microsoft365
1个回答
0
投票

啊哈哈哈,找到了答案 - 当然,孩子也是一个项目,所以只需将孩子 id 放在您看到 {itemid} 的地方即可 获取https://graph.microsoft.com/v1.0/users/{userid}/drive/items/{itemid}/permissions

© www.soinside.com 2019 - 2024. All rights reserved.