Reputation: 71
I am trying to retrieve OneDrive personal shared file permission using following query:
https://graph.microsoft.com/v1.0/me/drives/{drive-id}/items/{item-id}/permissions
But in response I am receiving following:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('myemail%40yahoo.com')/drive/items('fileid')/permissions",
"value": []
}
Instead of something as following mentioned on Microsoft OneDrive Graph API documentation:
{
"value": [
{
"id": "1",
"roles": ["write"],
"grantedTo": {
"user": {
"id": "5D33DD65C6932946",
"displayName": "John Doe"
}
},
"inheritedFrom": {
"driveId": "1234567890ABD",
"id": "1234567890ABC!123",
"path": "/drive/root:/Documents" }
}
]
}
What can be the reason for this?
Upvotes: 3
Views: 186
Reputation: 33124
This is expected behavior for files in a personal OneDrive that have not been shared with anyone. The Owner
permission for personal OneDrive is implied (the owner of the drive is the owner of every file within that drive) so it would only show Read
and Write
permissions (if any exist).
Upvotes: 1