-
-
Save IAMIronmanSam/53ac9acc0af293469533 to your computer and use it in GitHub Desktop.
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
using (ClientContext clientContext = new ClientContext("https://yoursite.sharepoint.com/")) | |
{ | |
SecureString passWord = new SecureString(); | |
foreach (char c in "yourpassword".ToCharArray()) passWord.AppendChar(c); | |
clientContext.Credentials = new SharePointOnlineCredentials("[email protected]", passWord); | |
Web web = clientContext.Web; | |
clientContext.Load(web); | |
clientContext.ExecuteQuery(); | |
Console.WriteLine(web.Title); | |
Console.ReadLine(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment