How to break permission inheritance using flow
In this article we will see how to break permission inheritance of a list item or file using Microsoft flow or Power automate.
Regarding permissions and groups tutorialsinhand.com have other article where you can explore if interested
-
How to add users to SharePoint group using Flow
-
How to create SharePoint group using Flow
Breaking permission of a list item or File is most important thing that we do in SharePoint as a developer and now this option is available in Flow and that makes flow more useful.
Normally when we a list item or file is created then sometimes we need to break the permissions and assign new permissions to the item or file.
Lets create a flow which runs when An item or file is created and break the permissions and assign new permissions to the item or file.
Create Flow
Lets create a flow and for this perticular example, the flow will trigger when an item is created.
So do below steps to create a flow
-
Navigate to https://flow.microsoft.com
-
Go to My flows and click new instant-From blank
-
Choose trigger when an item is create, if not there then click on skip and add later
-
Thus we have our flow created
Break Permision Inheritance
To break the permission inheritance, do below steps.
-
Click Add new Step and Choose "Stop sharing an item or file"
-
Select your Site address , List name and enter Id of item that need to break permission
-
Id can be choosen dynamically from Create an item trigger
Grant permission to the Item
Now the permission of item has been broken, and we may want to grant permission . follow below steps to grant permission.
-
Click on Add new step and choose Grant permission to an item or file.
-
In site address , Enter your site address
-
In List or Library Name , Enter your list name
-
In ID , Enter id of item to break permission, you can choose dynamically from trigger
-
In Recipients , Enter the login ids of users
-
in Role, Select role you need to grant
-
If you want to send Email Notification to users and choose Yes for notify recipients and enter a message.
-
Now you have created your flow. Save and test your flow by performing the trigger (i.e adding a new item in the list)
Would you like to see your article here on tutorialsinhand.
Join
Write4Us program by tutorialsinhand.com
About the Author
Mukesh Tiwari
Always ready to learn new technologies, A problem solver, exhibit to do attitude. Having around 10+ years of experience of development and management skills. I believe don't just set random goals but right goals suited for you.
Page Views :
Published Date :
Jun 27,2020