Friday, June 24, 2011

How to Impersonate SharePoint Client Object Model

Using this you can pass dedicated credentials to SharePoint client object.

using System.Net;
using Microsoft.SharePoint.Client;

ClientContext context = new ClientContext("http://server/");
context.Credentials = new NetworkCredential("user", "password", "domain");
// Some Cording
context.ExecuteQuery(); 

Post a Comment