How to get all document libraries within a sharepoint site?

Hi Guys,

Our requirement-
Retrieve the names of all document libraries that exist within a sharepoint site.

I couldn’t find any activity to retrieve this.

Is there anyway to retrieve list of all library names from a sharepoint site?

Regards
Sonali

Hello @sonaliaggarwal47!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff

@ermanoj3101 @ppr @Yoichi @jeevith @prasath17

Do you guys have any idea on this?

Regards
Sonali

Hi @sonaliaggarwal47 - Since I am working on my local machine, I dont have access to any of the sharepoint sites…

if that sharepoint is accessible via explorer, have you tried directory.getfiles or anything?

Hi @prasath17,

No, its not accessible via explorer.

And even if we manage to synch that site, it has to be done library wise for which library names need to be known in advance.

And that’s the part I am trying to figure out if count and names of libraries are unknown.

Regards
Sonali

Hi @radu_bucur @Diana_Mincu,

Do you guys have any suggestion to fetch.

Since we will be using your sharepoint package itself, thought it would be worthwhile to hear your views if anything like this is possible using that package :slight_smile:

Regards
Sonali

Hi @sonaliaggarwal47,

We have not used this approach before, but I don’t see any loop holes in this method explained here : SharePoint Online: PowerShell to List All Document Libraries - SharePoint Diary

You can use the PnP module in PowerShell to do further processing once you get the list of libraries PnP PowerShell Overview | Microsoft Docs
This approach uses the SharePoint API calls in the background, so is quite powerful.

Performance using PowerShell within your network will be quite good if you ever have to scale the approach later.

Another option could be the sharepoint rest api. Sometimes we can do quick rnd in browser url field after sucessfully logged in