我想用
PeopleManager
但出于某种原因,我没有。我只是
CS0246找不到类型或命名空间名称“PeopleManager”(您是否缺少using指令或程序集引用?)
我在用
Microsoft.SharePoint.Client
和
Microsoft.SharePoint.Client.RunTime
V4。0.30319
为什么我找不到人事经理?
我目前正在使用以下代码获取所有用户:
var web = clientContext.Web;
var list = clientContext.Web.SiteUserInfoList;
var users = list.GetItems(new CamlQuery());
clientContext.Load(users, includes => includes.Include(
f => f["GUID"],
f => f["FirstName"],
f => f["LastName"],
f => f["UserName"],
f => f.DisplayName));
try
{
clientContext.ExecuteQuery();
}
catch (Exception e)
{
Trace.TraceError(e.Message);
Trace.TraceError(e.StackTrace);
throw;
}
但也有一些用户失踪了。谢谢你的帮助。