Last active
August 27, 2017 15:33
-
-
Save vman/4518430 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/")) | |
{ | |
var 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