SharePoint File Permissions Properties and User Granting Mechanisms

Grzegorz Dubiel 20 Reputation points
2024-04-02T08:31:38.7966667+00:00

Hello!

I have a requirement to fetch permissions for files stored in SharePoint. Most of my work is done, but I'm struggling to identify some properties available in the permission resource.

I need to understand how these properties can be accessed for the file from both the UI and the API context.

Here are the properties:

  • inheritedFrom - For each permission of each file, this property appears to be empty.
  • invitation - Even if I invite someone, for example, via Azure Portal, a link, or through the UI, this property is consistently missing in the permission details.

Additionally, I have a question regarding these resources: If a user, group, site group, or site user has been granted permission in relation to one of these properties, will they be added to the grantedToV2 or grantedToIdentitiesV2?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,656 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,688 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.
2,675 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 31,606 Reputation points Microsoft Vendor
    2024-04-03T06:36:20.8866667+00:00

    Hi @Grzegorz Dubiel,

    Per my research, in oneDrive for Business and SharePoint document libraries will not return the inheritedFrom property. It's an expected result. You could refer to the following document for more details

    https://learn.microsoft.com/en-us/graph/api/resources/permission?view=graph-rest-1.0

    For permission, you could use followig api

    https://graph.microsoft.com/v1.0/sites/{sitesId}/permissions
    
    

    Documentation: List permissions


    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.