问题
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