Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 68mrAe0r1atEA3vXZYed24
Power Automate - General Discussion
Unanswered

Create document library

Like (0) ShareShare
ReportReport
Posted on 3 Jul 2021 13:35:02 by

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.

 

  • Expiscornovus Profile Picture
    31,665 Most Valuable Professional on 05 Jul 2021 at 18:06:02
    Re: Create document library

    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:

    https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest#working-with-lists-by-using-rest

    BaseTemplate 101 is the number for a Document Library btw

     

     

    {
     "AllowContentTypes": true,
     "BaseTemplate": 101,
     "ContentTypesEnabled": true,
     "Description": "My list description",
     "Title": "@{variables('LibraryName')}"
    }

     

    createlibrary_restapi.png

     

    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']

     

     

    createnewfolder_newlibrary.png

     

    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']

     

     

    grantaccess.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - General Discussion

#1
David_MA Profile Picture

David_MA 8 Super User 2025 Season 1

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 8 Super User 2025 Season 1

#3
ankit_singhal Profile Picture

ankit_singhal 7 Super User 2025 Season 1

Overall leaderboard
Loading started