0

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?

1 Answer 1

0

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

2
  • This gives me error when trying to give an individual user permissions on the list item using their email address as the principalid value: Input string was not in a correct format. Does anyone know how to use this action to assign an individual user permissions on the list item? The reason we are looking at this approach is that Grant access to an item or a folder action is not working when we define a custom permission level role id - it is only working with out of the box permission level role ids. Commented Mar 17, 2023 at 5:21
  • 1
    Can you show us the endpoint (Uri) you are using? Ask new question by providing more details and screenshot of flow if possible. Commented Mar 17, 2023 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.