OFFICE 365 API 从可共享的 AnyoneWithLink 检索外部用户列表 link

OFFICE 365 API to retrieve external users list from AnyoneWithLink shareable link

是否有 API 获取通过可共享 link 共享文档的所有外部用户。

下面是例子

在下面 URL 中使用 driveId 和 documentId 我们可以检索权限。 /drives/{drive-id}/items/{item-id}/permissions

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

`

"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": "abc@gmail.com",
        "surname": null,
        "userPrincipalName": null,
        "id": null,
        "givenName": null,
        "mail": null,
        "email": "abc@gmail.com"
      }
    }
  ],
  "expirationDateTime": null
}

`