Forum Discussion
Bulk assign SharePoint Folder Permissions
Hi Experts,
I am faced with a challenge where I need too assign different permissions to each of the 500+ sub-folders in a SharePoint folder. This folder contains sub folders for each line manager (folder name is manager name) in my organisation and I only want the named manager to have access to their specific folder and nothing else.
I have seen how these can be achieved manually but wondered if there is another way of doing this in bulk as it is time consuming doing it individually for 500+ files?
Has anyone faced this problem before, how did you get round to it?
Thanks
2 Replies
- Carlos_MarinsIron Contributor
Hi Ramson1809,
Maybe you could use the https://github.com/pnp/PnP-PowerShell library to automatically set these permissions for you. Take a look at the https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/set-pnpfolderpermission?view=sharepoint-ps command. You could use the -ClearExisting parameter to remove all existing permissions and then the -AddRole parameter to grant permission to the specified manager. Let me know if you need any help with that.
- Ramson1809Copper ContributorThanks for your prompt response Carlos - very helpful. I will take a look at the links you have provided 🙂