Question

This is probably a longshot, but does anyone know of a way to resolve a name entered in a Silverlight textbox to a SharePoint User object in Silverlight, using the client object model?

Ideally, I'd like to be able to have an object I can write back to a SharePoint List.

Was it helpful?

Solution

You should be able to resolve the user using code similar to these examples. I don't have a 2010 environment running at the moment but here's a suggestion:

var clientContext = new ClientContext("http://MyServer/sites/MySiteCollection");
var collGroup = clientContext.Web.SiteGroups;
clientContext.Load(collGroup,
    groups => groups.Include(
        group => group.Users.Include(
            user => user.Title,
            user => user.LoginName).Where(
                user => user.Title.Equals("John Smith"))));
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top