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

本小妞迷上赌 提交于 2020-06-17 14:51:30

问题


Is there any API to get all the external users to whom document is shared via shareable link.

Below is the example


回答1:


Using below URL with driveId and documentId we can retrieve the permisisons. /drives/{drive-id}/items/{item-id}/permissions

Under permisison response we can see with link shared with specific people permission objects contains grantedToIdentities field which is list of all specific peoples with whom document is shared as 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
}

`



来源:https://stackoverflow.com/questions/60754344/office-365-api-to-retrieve-external-users-list-from-anyonewithlink-shareable-lin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!