using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.SharePoint.Client; namespace GowthamSamples { class Program { static void Main(string[] args) { // ClientContext - Get the context for the SharePoint Site ClientContext clientContext = new ClientContext("http://gauti.sharepoint.com/sites/sp1/"); GroupCollection Groups = context.Web.SiteGroups; // Assume that there is a "Owners" group, and the ID=7. Group ownersGroup = Groups.GetById(7); context.Load(ownersGroup.Users); context.ExecuteQuery(); foreach(User owner in ownersGroup.Users) { Console.writeLine(owner.Title); } } } }
Thanks for reading my blogs.