web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Get a list of document...
Power Apps
Unanswered

Get a list of document libraries from a SharePoint site

(0) ShareShare
ReportReport
Posted on by 23

Hello all,

 

I have a radio control and I want the items to be the names of the document libraries in my SharePoint Online site. I can easily connect a particular library and see the files and folders within that library, but that's not what I really want. I need a list of the libraries on a site. 

 

Is this even possible? I've spent days on this to no avail!

 

Thanks for your help.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @supchu ,

    I assume you know the names of all of the Libraries.

    Do a collection

    ClearCollect(
     colLibraries,
     {
     LibName:"Name 1"
     LibName:"Name 2"
     LibName:"Name 3"
     }
    )

    Your radio control Items could then be colLibraries.LibName

    You would then have to navigate on the OnChange property to whatever you needed it do.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    There is no connector in Power Apps that will give you that information directly.  There are two possible ways I can think of.  

    1. Create a custom connector that uses a REST API call to get the list of Libraries in Power Apps
    2. Call a Flow and use the SharePoint HTTP REST action to retrieve the list of file Libraries and pass it back to Power Apps 
  • supchu Profile Picture
    23 on at

    @WarrenBelz Thanks for the suggestion, but that's not really going to work. I want to be able to pull the list of libraries because I don't want to have to type them in manually if/when the libraries change.

     

    This is actually the first part of a two-step process. I want the user to be able to select a library from the radio control, then a gallery control would show the documents inside that library. Otherwise, I can't think of another way for the user to navigate between libraries.

  • supchu Profile Picture
    23 on at

    @Pstork1  That's an interesting idea. I didn't know I could create new connectors. I don't have much experience with writing REST API calls, so I'll need to learn more about that. 

     

    Calling a Flow sounds easier, but I'm worried about the lag time for the Flow to actually activate and return the info back to PowerApps. What do you think?

  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    I was intrigued by the idea, so I built a POC of it yesterday.  Here's a screen shot of the flow.  Its called from Power Apps and then the response is stored in a collection.  I then bound the collection to a gallery.

    screenshot.png

  • supchu Profile Picture
    23 on at

    @Pstork1 thanks for the screenshots! I'm going to give it a try and come back with the results.

  • supchu Profile Picture
    23 on at

    So I gave it a shot and unfortunately it seems this kind of coding is beyond my skills. I don't really have a lot of experience writing REST API calls so I don't know what to write for the expression. I think I am going to have to tackle this a different way. Thanks for the help, though!

  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    Unfortunately, a REST call is the only way I know of to generate a list of libraries available in Power Apps or Power Automate.  Your only other choice will be to hand code the list.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard