cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DanielCostaO365
Frequent Visitor

How can I edit group permission within a already broke permission folder?

How can I edit the permissions of a SharePoint group on a list folder? This folder already has the broken legacies of the previous folder!

Or else to inherit the inheritance from the previous folder and then repeat the process of giving permissions again?

 

Thanks in advanced!

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @DanielCostaO365 

 

Power Automate have an action called Grant access to an item or a folder.

 

image.png

 

If the above doesn't meet your requirement then have a look at Send an HTTP request to SharePoint utilising ODATA API.

 

image.png

 

To remove the current role

 

_api/web/GetFileByServerRelativeUrl('<file relative url>')/ListItemAllFields/roleassignments/getbyprincipalid(<groupId>)
method: POST      

 To add a new role

 

/_api/web/GetFileByServerRelativeUrl('<file relative url>')/ListItemAllFields/roleassignments/addroleassignment(principalid=<groupId>,roledefid=<targetRoleDefinitionId>)
method: POST

 Reference:

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/set-custom-permissions-on-a-list-by-using...

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

1 REPLY 1
abm
Super User
Super User

Hi @DanielCostaO365 

 

Power Automate have an action called Grant access to an item or a folder.

 

image.png

 

If the above doesn't meet your requirement then have a look at Send an HTTP request to SharePoint utilising ODATA API.

 

image.png

 

To remove the current role

 

_api/web/GetFileByServerRelativeUrl('<file relative url>')/ListItemAllFields/roleassignments/getbyprincipalid(<groupId>)
method: POST      

 To add a new role

 

/_api/web/GetFileByServerRelativeUrl('<file relative url>')/ListItemAllFields/roleassignments/addroleassignment(principalid=<groupId>,roledefid=<targetRoleDefinitionId>)
method: POST

 Reference:

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/set-custom-permissions-on-a-list-by-using...

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,473)