cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gj84uw
Advocate III
Advocate III

Setting permissions and advanced settings on SP library

Hi everyone

I'm experimenting with site designs/scripts in SharePoint and have got a script that creates a couple of libraries which all works well.  However, I now want one of these libraries to be created as a 'private' library i.e. only site owners can access.  I also have some other settings that I want to configure on this library that would normally be access in the Advanced Settings menu:

gj84uw_0-1620136295174.png

I know I can't do this directly with the site script but I can call a flow.  However, I'm not sure if the advances settings can be configured via a flow?  i assume I'd have to use the Send a HTTP request to SharePoint action but I'm not sure if this is possible?

Also, I know I can set item and folder level permissions in a SharePoint library but I haven't seen a way of setting permissions for the whole library.  Again, does anyone know if this is possible?

Thanks in advance for your help.

4 REPLIES 4
Pstork1
Dual Super User
Dual Super User

Yes you can break inheritance and set Library level permissions using a flow.  I'll post screenshots later today when the service is back up and running.  Right now I can't open any flows in edit mode due to the Power Apps outage.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

Here are screenshots of the flow actions required to set permissions on a Library.  The first two retrieve the IDs for a named permission level and a specific user.

image.png

Once I have those I can break inheritance on the library and set individual permissions.

image.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

@Pstork1 that's great, thanks for the prompt reply.  Would you know if it's also possible to set some of the advanced options in a library using REST actions?  I was hoping to disable the ability to create folders in the library, which I can do via the advanced settings menu but wondered if this can be done automatically in the same flow?

Pstork1
Dual Super User
Dual Super User

I don't think MS wrote a REST API for managing the settings of a List/Library.  I know you can do it using PowerShell, but I've never found a way to do it using REST.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

Helpful resources

Announcements
Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (5,717)