Hi, I'm new with power automate. May I know if possible to create a document library for all staff but with a condition like this:
User sign-in -> view & edit folder that belongs to them and cannot view other staff folder -> supervisor can view&edit only people in their department.
I hope someone will help me with example how to solve this problem.
Hi @FatyNab,
My first question would be how you are determining that 'folder belongs to a user'? Are you tagging the folders with metadata or does the folder have the name of the staff member?
Below are a couple of examples of type actions you probably can use in your scenario.
1. Send an HTTP request to create a new library. This is using the REST API:
BaseTemplate 101 is the number for a Document Library btw
{
"AllowContentTypes": true,
"BaseTemplate": 101,
"ContentTypesEnabled": true,
"Description": "My list description",
"Title": "@{variables('LibraryName')}"
}
2. Create new folder action which uses the id of step 1. Below expression is used in the List or library field as a custom value.
outputs('Send_an_HTTP_request_to_SharePoint')?['body']['Id']
3. Grant access to the new folder for Jane Doe, using the id of the folder of step 2. Below expression is used in the Id field as a custom value.
outputs('Create_new_folder')?['body']['ID']
David_MA
8
Super User 2025 Season 1
Michael E. Gernaey
8
Super User 2025 Season 1
ankit_singhal
7
Super User 2025 Season 1