sharepoint组。检索网站集中所有组中的所有用户

示例

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);

    }

}

           

以上是 sharepoint组。检索网站集中所有组中的所有用户 的全部内容, 来源链接: utcz.com/z/353345.html

回到顶部