Forum Discussion
Supriya_12
Mar 29, 2024Copper Contributor
Issue with Graph Permission API for folders
Hello Community,
I am currently working on an application that utilizes Graph APIs to synchronize local changes with Microsoft OneDrive folders. This functionality extends to both folders within my drive and those shared with me.
Specifically, I utilize the Permissions Graph API to retrieve information regarding the user's access level, whether it be read or write permissions.
The documentation says, the permissions collection includes potentially sensitive information and may not be available for every caller.
- For the owner of the item, all sharing permissions will be returned. This includes co-owners.
- For a non-owner caller, only the sharing permissions that apply to the caller are returned.
- Sharing permission properties that contain secrets (e.g. shareId and webUrl) are only returned for callers that are able to create the sharing permission.
Documentation: Access to sharing permissions
Now, despite the above points, I've encountered an inconsistency. When I attempt to fetch permissions for a folder shared with me with read permission, I do not receive the permissions granted to me. This seems to contradict the second point mentioned earlier.
Below is a sample response I receive as a read-only recipient of the folder:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('user id removed for privacy reasons')/drives('drive id removed for privacy reasons')/items('item id removed for privacy reasons')/permissions",
"value": [
{
"id": "permission id removed for privacy reasons",
"roles": [
"owner"
],
"shareId": "shared permission id removed for privacy reasons",
"grantedToV2": {
"user": {
"@odata.type": "#microsoft.graph.sharePointIdentity",
"displayName": "Test user",
"email": "email address removed for privacy reasons",
"id": "user id removed for privacy reasons"
},
"siteUser": {
"displayName": "Test user",
"email": "email address removed for privacy reasons",
"id": "3",
"loginName": "i:0#.f|membership|email address removed for privacy reasons"
}
},
"grantedTo": {
"user": {
"displayName": "Test user",
"email": "email address removed for privacy reasons",
"id": "user id removed for privacy reasons"
}
}
}
]
}
I've been relying on this API for over a year to carry out operations successfully. However, I've recently observed a disruption in its functionality within the past week or so. Have there been any updates implemented? Has the response format been modified in any way?
No RepliesBe the first to reply