Skip to content

Instantly share code, notes, and snippets.

Jonathan Cardy johnnycardy

Block or report user

Report or block johnnycardy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gautamdsheth
gautamdsheth / InstallAppCSOM.cs
Last active Aug 8, 2019
Install app to site collection using CSOM C# in SharePoint Online
View InstallAppCSOM.cs
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))
{
You can’t perform that action at this time.