I am trying to pass userid and password through the clientContext.Credentials method, but i am getting the below error
microsoft.sharepoint.client.clientcontext' does not contain a definition for 'credentials'
Below is the code snippet that i am trying to use
var ctx = new ClientContext("SITE URL"); ctx.Credentials = new Microsoft.SharePoint.Client.SharePointOnlineCredentials("username", "password");
Also, I have included the below namespaces
using Microsoft.SharePoint; using Microsoft.SharePoint.Client;
What have i missed? Why is the
.Credentials not available?
I am using .Net version 4 for the project