Pages

Thursday, 29 January 2015

Get SPGroup users in SharePoint programmatically

 SPGroup UserGroup = OWeb.Groups["User Group Name"];
 if (UserGroup.Users.Count > 0)
  {
     foreach (SPUser User in UserGroup.Users)
     {
        string UserName=User.LoginName;
     }
  }

No comments:

Post a Comment