
Announcements
I have two Lists, Submission & Review, and one document library, Repository. A folder is automatically generated within the Repository document library, with a title I composed using inputs from 3 fields, when a new entry is created in the Submission list. When Submitter changes the status of a field to "Submitted" on the Submission list, it generates an identical entry on the Review List.
At this point, I want to be able to remove the original submitter's access to the auto-generated folder in the Repository and grant access to Reviewer 1, Reviewer 2, and Reviewer 3. How do I accomplish this?
I've tried the stop sharing & grant access actions on SharePoint but I've discovered those only works for items or lists, not folder.
Later down the road, when the Review process have completed (Reviewer 3 has changed his review status to "Review Complete" on the Review list, I want to return access of the original submitter to the folder again).
o remove SharePoint folder permissions using Power Automate, you can follow these steps:
Create a Flow: Start by creating a new flow in Power Automate.
Trigger: Choose a trigger that suits your scenario, such as "When a file is created or modified" or "Manually trigger a flow."
Send an HTTP Request to SharePoint:
POST/sites/{site-name}/_api/web/GetFolderByServerRelativeUrl('/{folder-path}')/ListItemAllFields/breakroleinheritance(copyRoleAssignments=false, clearSubscopes=true)Remove Permissions:
POST/sites/{site-name}/_api/web/GetFolderByServerRelativeUrl('/{folder-path}')/ListItemAllFields/roleassignments/removeroleassignment(principalid={user-id}, roledefid={role-id})Test the Flow: Save and test your flow to ensure it works as expected.