Reputation: 3654
I am developing silverlight web part for sharepoint 2010 in C#.In silverlight client object model the sharepoint 2010 takes the current user credential by using the following statement
ClientContext clientContext = ClientContext.Current;
Now I want to login programatically with different user name and password. So that it can access only that particular user data. But I found that there is no clientContext.Credentials in silverlight client object. We can insert the data for another user by using the following link
How to set SharePoint "Author" in silverlight client object model?
But I am not aware how we can get the data for that particular user by passing the credentails. How can I login with different user name and password programatically so that I can access that particular user data ? If there is any way to do that please tell me. Can we do it through web services ? Can you please provide me any code or link through which I can resolve the above issue ?
Upvotes: 3
Views: 913
Reputation: 436
Client Object Model is a subset of Server Object Model and one of the limitations of Client Object model is that it doesn't support impersonation.
One workaround will be to call a WCF endpoint via jQuery by passing all the data. Then WCF can impersonate the call to SharePoint by processing the data on some else's behalf
Upvotes: 1