Can we break the permission inheritance for a SharePoint custom list item + get all the permission assignments, using GraphAPI instead SharePointAPI

john john 1,021 Reputation points
2023-04-05T14:13:32.9066667+00:00

Inside our Power automate Cloud flow we have these actions:

  1. Break Permission inheritance
  2. Get all Permission assignments
  3. Remove all Permission assignments

as follow: [enter image description here

[enter image description here

So can we perform all/some of those actions using Graph API instead of SharePoint API? since Graph API is more future proof?

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2023-04-05T15:52:38.33+00:00

    Hello john john,

    Thanks for reaching out!

    Currently using Microsoft Graph API, you can either get site permission and get drive item permissions and it is not possible to break the permission inheritance for a SharePoint custom list item and get all the permission assignments. You can send a sharing invitation to user using Microsoft Graph API.

    Using SharePoint REST APIs you can get permissions for a site, list, library, item as well.

    https://domain.sharepoint.com/_api/web/lists/GetByTitle('{listTitle}')/RoleAssignments?$expand=Member
    

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


  2. Rahul Kumar 0 Reputation points
    2023-04-05T15:57:11.2766667+00:00

    Hello good morning

    0 comments No comments

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.