I can successfully get the sharing permissions for a drive like this:
GET https://graph.microsoft.com/v1.0/users/{userid}/drive/items/{itemid}/permissions
This is giving me "grantedToV2" information which includes information on who this item has been shared with:
"grantedToV2": {
"user": {
"@odata.type": "#microsoft.graph.sharePointIdentity",
"displayName": "USER NAME",
"email": "USER EMAIL",
"id": "USER ID"
}
I can also successfully get the children of that drive item, e.g. all the images in a folder (if the item is a folder) with this request:
GET https://graph.microsoft.com/v1.0/users/{userid}/drive/items/{itemid}/children
HOWEVER, I am struggling to get the permissions for the child items - I've tried things like:
- GET https://graph.microsoft.com/v1.0/users/{userid}/drive/items/{itemid}/children/{childid} with/without permissions reference because {childid} is not a selectable endpoint
but none of it exists.
How else could I be getting the "grantedToV2" information for the child item?
Any help highly appreciated!
ahahaha, found the answer - the child, of course, is also an item, so just put the child id in here where you see {itemid} GET https://graph.microsoft.com/v1.0/users/{userid}/drive/items/{itemid}/permissions