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

Assign custom permissions to document library folder - but not sub-folders

Have managed to create a flow, that takes input from an item created in a list (used for tasks from other departments), and creates a folder in a specified location where measurement results will be placed.
The naming of the folder is: Results/Year/MonthMM_MonthMMMM/TaskID (MM = 01 for january, MMMM = January)

Year and Month are defined through compose and utcnow(). 

 

I need to setup the flow, so the people chosen in a people picker is assigned rights to the folder. However, as the rights are to a sub-folder, to be able to access through the folders above (as some might have several tasks) I need to assign read-rights to both the Year and Month folder - my issue is that the flow also assigns read-rights to all the other folders in example the month folder. 
I am using the "grant access to an item or a folder" as the trigger. 

 

The 1st setup I worked on was to just have the folder location as: Results/TaskID

With this setup I don't have to worry about getting access to more than necessary, but with several hundreds tasks each year (and that all data must be kept), the list of folders will be very long. 

 

I've seen that some (older) guides take the use of the "send an http request" and changes permissions. I have, however, been unable to find a guide that shows how to use it to assign rights to a library (those I've found are about lists).

 

Anyone who have better google-skills than me or is able to say that my idea is just not feasible with the current microsoft flow setup?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support
Community Support

Hi @LouiseBach ,

 

Sorry for there is no any way to achieve the requirement in microsoft flow currently.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

@v-alzhan-msft 

I actually managed to do it 🙂 

 

Used the REST API (http request to sharepoint) to break inheritance on the folder that had been created, delete all access and then re-add the members group and the specific employees chosen in a field in the list.

Checked with co-workers and they can only see the folders that they have access to. 

No-one share with others that don't already have access, so I have the future permission settings under control (I think) 

View solution in original post

2 REPLIES 2
Community Support
Community Support

Hi @LouiseBach ,

 

Sorry for there is no any way to achieve the requirement in microsoft flow currently.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

@v-alzhan-msft 

I actually managed to do it 🙂 

 

Used the REST API (http request to sharepoint) to break inheritance on the folder that had been created, delete all access and then re-add the members group and the specific employees chosen in a field in the list.

Checked with co-workers and they can only see the folders that they have access to. 

No-one share with others that don't already have access, so I have the future permission settings under control (I think) 

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (7,092)