I have the following code in a Client Object Model method:
Group oGroup = clientContext.Web.SiteGroups.GetById(mGroupID);
However, I need to get the group by name. In order to do this I have retrieved a collection of group names and IDs using the usergroup.asmx and searched through it to find the ID, finally applying the above code. It works, but is not cool enough.
I have not found any other method on the SiteGroups collection which would allow me to search by name. The .FirstOrDefault method throws an error saying that Lambdas are not allowed.
I am looking for something maybe that would allow me to pass a CAML query such as the ListItemCollection which has the .GetItems method.