Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

SiteUsers, GetUserById, etc does not exist from client object model

$
0
0

I'm trying to get information on site users via the sharepoint client object model.  But whenever I try to use calls such as GetUserById or SiteUsers, I get the error "Does not exist".  The following code, for example, would give that error when the ExecuteQuery is called.  It *feels* like the client object model doesn't support user-based actions, but that doesn't make sense, since these calls show as valid in any documentation I can find.

Oh, and please, let's not get into the alternative ways.  For what I'm doing, I need these calls.  I'm not asking for other ways, I'm trying to find out why these calls aren't working.  Thanks for understanding.

Does anyone have any ideas.  Is there some other Load I need to perform?  Is it an inherent limitation with the client object model?  Thanks for any definitive answers.

var context = GetContext(SiteUrl);

var myuser = context.Web.GetUserById(45);

context.Load(myuser, g => g.LoginName, g => g.Id, g => g.Title);

context.ExecuteQuery();


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>