I have SharePoint Online site and library with folders.

There are folder like YEAR / Month / 16 June / files inside.

What would be the best way to download files from this folders?

I can use C# or VBS.

At this moment I am trying to Connect they application using C# SharePoint Client Have sharepoint user name and password.

It seems like I am not able to get auhtorized with some reasons. Got following exception:

Exception: Cannot contact web site 'https://mypage.sharepoint.com/' or the web site does not support SharePoint Online credentials. The response status code is 'Unauthorized'

Is there something do authorize me app?

  • Do you want to download it from any custom application only or you are fine with SharePoint OOTB suggestion? Jan 6 at 11:50
  • No, I just want to download them from they library into hard drive folder.
    – Odyn
    Jan 6 at 12:01

If you want to download a folder and all folders/files inside it then you can do it from SharePoint UI.

  • Go to SharePoint library
  • Select folder
  • Click on Download from top ribbon
  • It will download a zip file with folder and its contents

enter image description here

Microsoft documentation: Download files and folders from OneDrive or SharePoint

Update from Comments:

Check this reference to download files programmatically: Download files from document library using C#

  • But it needs to be done from application side not manually
    – Odyn
    Jan 6 at 12:04
  • What type of application you have? console application/.Net application or any other application? Jan 6 at 12:14
  • You can also use PowerShell solution or PnP PowerShell solution if you are OK with it. Jan 6 at 12:15
  • Its simply .NET framework console application. And SharePoint Client library.
    – Odyn
    Jan 6 at 12:15
  • I need this like a simple console app to be invoked from other application.
    – Odyn
    Jan 6 at 12:15

I think the best way to store info on SharePoint is to dismiss folders instead of metadata and after create views acts like a folder.


Check if the following references are helpful:



  • Thank You! I will test this a bit later because waiting to resolve authentication issues first.
    – Odyn
    Jan 7 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.