Showing posts with label ClientContext. Show all posts
Showing posts with label ClientContext. Show all posts

Thursday, December 24, 2020

Unauthorized exception while downloading file from SharePoint

In this article, How to download the SharePoint  library files in Document Library


 var file = clientContext.Web.GetFileByServerRelativeUrl(fileRef);

                clientContext.Load(file);

                clientContext.ExecuteQuery();                    

                ClientResult<Stream> streamResult = file.OpenBinaryStream();

                clientContext.ExecuteQuery();

#sharepoint #SharePoint Developer/  #O365 #Administrator/ #NET #jQuery #AngularJS #poweapps #powerautomate #spfx #pnp #workflo