This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ResolveEventHandler handler = null; | |
handler = (sender, args) => | |
{ | |
// Use latest strong name & version when trying to load SDK assemblies | |
var requestedAssembly = new AssemblyName(args.Name); | |
if (requestedAssembly.Name != shortName) | |
return null; | |
Debug.WriteLine("Redirecting assembly load of " + args.Name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string webUrl = "https://tenant-name.sharepoint.com/sites/test/"; | |
string username = "user.name@tenantname.onmicrosoft.com"; | |
string password = "password"; | |
SecureString secureString = new SecureString(); | |
password.ToList().ForEach(secureString.AppendChar); | |
var credentials = new SharePointOnlineCredentials(username, secureString); | |
using (ClientContext ctx = new ClientContext(webUrl)) | |
{ |