2
votes

In the OneDrive user interface, it is possible to update a drive item so that the permissions no longer inherit from the parent (Stop Inheriting Permissions). Is it possible to do the same through the Graph API? I can seem to find any call that seems to allow for that. In the documentation for Delete Permissions, it says: "Only sharing permissions that are not inherited can be deleted. The inheritedFrom property must be null."

We need to be able to programatically set the permissions on drive folders and items and one of the things we have to do is to stop inheritance from parent.

Regards, LT

1
I have been doing more testing and there is some differences in behaviour between what I see in the OneDrive UI and Graph API: - user1452215
In the UI, for an item that is in a folder, when I look at the permissions, I can't change them until I hit "Stop Inheriting Permission". But when I look at the permission for that item through graph API, none of the permissions have value for "inheritedFrom" and I am able to delete the permission. Once I delete a permission that is inherited from the parent folder through the API, and the go look in the UI, the permissions for the item are no longer inherited. - user1452215

1 Answers

0
votes

i know it's a long time question but here what you can do :

The "inherited" is only a list of allow users/groups ... if you delete all of them, your folder become a "only you" folder permission (no inheritance)

I use that in my application, it's not the most simple but it works