-
StackOverflow 文件
-
sharepoint 教程
-
使用託管客戶端物件模型(CSOM)
-
組。檢索網站集的所有組中的所有使用者
ClientContext clientContext = new ClientContext("http://MyServer/sites/MySiteCollection");
GroupCollection collGroup = clientContext.Web.SiteGroups;
clientContext.Load(collGroup);
clientContext.Load(collGroup,
groups => groups.Include(
group => group.Users));
clientContext.ExecuteQuery();
foreach (Group oGroup in collGroup)
{
UserCollection collUser = oGroup.Users;
foreach (User oUser in collUser)
{
Console.WriteLine("Group ID: {0} Group Title: {1} User: {2} Login Name: {3}",
oGroup.Id, oGroup.Title, oUser.Title, oUser.LoginName);
}
}