OneDrive 权限 - 使用 Microsoft Graph 获取完整数据 API

OneDrive permissions - get full data using Microsoft Graph API

在 OneDrive 中设置权限/访问 link 时,有很多选项:

但是使用Microsoft Graph访问文件权限时API

https://graph.microsoft.com/v1.0/users/{user_id}/drive/items/{item_id}/permissions

我没有得到 set expiration dateset passwordblock download: 响应如下所示:

        {
            "id": "permission_id",
            "roles": [
                "write"
            ],
            "link": {
                "scope": "anonymous",
                "type": "edit",
                "webUrl": "webUrl"
            }
        }

如何获取所有数据?我应该使用不同的 API 吗?

Graph API 的 beta 版本似乎支持这个:

https://graph.microsoft.com/beta/users/{user_id}/drive/items/{item_id}/permissions/{permission_id}

将给出以下响应:

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#users('user_id')/drive/items('item_id')/permissions/$entity",
    "expirationDateTime": "2020-04-26T21:00:00Z",
    "hasPassword": true,
    "id": "permission_id",
    "roles": [
        "read"
    ],
    "link": {
        "preventsDownload": true,
        "scope": "anonymous",
        "type": "view",
        "webUrl": "webUrl"
    }
}