OFFICE 365 API从AnyoneWithLink可共享链接中检索外部用户列表。

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

是否有任何API可以获取所有通过可共享链接分享给外部用户的文档。

下面是一个例子

enter image description here

office365 office365api
1个回答
1
投票

使用下面的URL,加上driveId和documentId,我们可以检索到permisisons.drives{drive-id}items{item-id}权限。

在权限响应下,我们可以看到,与特定的人共享链接的权限对象中包含了 grantedToIdentities 字段,该字段是所有与之共享文档的特定人的列表。

`

"grantedTo": null,
  "roles": [
    "write"
  ],
  "id": "0h6842a8-b407-4ytc-bb6f-300cureed649",
  "link": {
    "webUrl": "https://test-my.sharepoint.com/:x:/g/personal/testUser_onmicrosoft_com/kschdjduuhjUUU_atwwoslsXjs4Ya0mW41xwpy",
    "scope": "users",
    "type": "edit"
  },
  "grantedToIdentities": [
    {
      "user": {
        "displayName": "[email protected]",
        "surname": null,
        "userPrincipalName": null,
        "id": null,
        "givenName": null,
        "mail": null,
        "email": "[email protected]"
      }
    }
  ],
  "expirationDateTime": null
}

`

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