0

I have just started with a SharePoint and I am not able to do a simple thing.

I have over 12k files on SharePoint and I want to write a desktop app using C#, which schows me all files with names, sizes, paths and modification dates. Then user can select and download few of them. App schould work in an external network.

I tried with a Microsoft.SharePoint.Client and REST Api but I always got 403 Access Forbidden.

Is it even possible to download this informations from external network? If it is, which API schould I use? I'am little bit confused in SharePoint world.

SharePoint is with O365 and cliens are external customers, so they won't have any accounts.

0

You will have two issues to deal with: permissions, and list throttling limits. For a start on authorization do a search for "sharepoint online rest api c#" or start here: Make a RESTful API Call to SharePoint Online from Console program

When working with large lists, you will need to make multiple requests to page through the results, typically no more than 5,000 at a time.

  • Thanks for an answer. I found following dll: microsoft.sharepoint online.csom. It works and it's fine. But now I am stuck. I have to share all my files, which means I have to generate anonymous view link for them. ObjectSharingInformation.anonymousViewLink returns this link only if I manually click on specific file and share it. It doesn't work if I share whole folder. Is it possible to generate anonymous link for all files? I don't have method ctx.Web.CreateAnonymousLinkForDocument in my dll. – FromSomewhere Mar 22 '18 at 9:54

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.