How to avoid parent pushing their own permissions to child with broken permissions

Andy Holvoet 0 Reputation points
2024-10-10T16:37:19.8766667+00:00

The reason why new permissions added to a root folder in a SharePoint document library are also added to subfolders, even when inheritance is broken is that this option is selected by default. ("Share everything in this folder, even items with unique permissions")

We are using the Graph API to set permissions (https://learn.microsoft.com/en-us/graph/api/driveitem-invite?view=graph-rest-1.0&tabs=csharp)

Is there a way to pass the value of this checkbox via a Graph API request? In our case permissions added to a parent should never be inherited to children with broken inheritance. It seems the default for the checkbox is "true" when making API calls. How to override this?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,318 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,054 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 47,391 Reputation points Microsoft Vendor
    2024-10-11T06:52:56.45+00:00

    It looks like you're dealing with a common issue when setting permissions in the SharePoint document library by using Graph API. By default, new permissions added to a root folder are inherited by subfolders, even if inheritance is broken. This is because the "Share everything in this folder, even items with unique permissions" option is selected by default.

    Per my research, there isn't a direct way to pass the value of this checkbox via a Graph API request. In the "Send a sharing invitation", there are only following paraments can be set in the request.

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.