Question

I am using 'Grant access to an item or a folder' action to grant access to users at SharePoint list item level.

Now the requirement is to grant access to SharePoint Group as well. How can I pass the group as parameter here in the action to grant access?

Was it helpful?

Solution

As per the documentation at: Grant access to an item or a folder,

Recipients has type email and expects the Email address or users or Microsoft 365 groups, etc.

So as per my understanding, you will not able to able to grant access to SharePoint group using this action.

Workaround:

You can use SharePoint REST API in Send an HTTP request to SharePoint action to grant access to SharePoint group on list item. You need to use below endpoint:

_api/web/lists/getbytitle('<List Name>')/items(<List Item ID>)/roleassignments/addroleassignment(principalid='<Group Principle ID>', roleDefId=<Role Definition ID>)

Example:

enter image description here

Reference: Set SharePoint List Item Permissions Using MS Flow

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top