New answers tagged

0 votes

Get all Folders and Files recursively in SharePoint online with CSOM in C# and store it in one list where I can work with it

You can get all the files and folders in a list or library using a single CAML query. Just include the RecursiveAll ViewScope: <View Scope='RecursiveAll'><Query></Query></View>....
  • 12.4k
0 votes

File not found error when uploading file using CSOM

Try replacing line 8 from your code with this: string documentUrl = txtSiteURL.Text + "Docs/" + fileName; If the txtSiteURL.Text parameter already comes with a / at the end. the "/Docs/...
0 votes

Create a tree view in c# on SharePoint Online Document Library Basis with CSOM

You can refer to following code to enable tree view clientContext.Web.TreeViewEnabled = true; clientContext.Web.Update(); clientContext.ExecuteQuery();
0 votes

Get all Files and Folders and subfolders from a Root Site in a tree view with C# in a PNP Core Framework

see the following code private static void UseRecursiveMethodToGetAllItems() { using (var context = new ClientContext(WebUrl)) { context.Credentials = new SharePointOnlineCredentials(...
1 vote

CSOM PowerShell script - moving to modern authentication

If you are using the old SharePoint dlls. Make sure you install or are using the last PnP powershell library. Then you can use the following code to prompt the MFA ...

Top 50 recent answers are included