0

I'd like to check if a certain group already has permission on the site using the client object model.

I couldn't find any good example for that.

2

Here is an example:

ClientContext clientContext = new ClientContext("http://SiteUrl"); 
GroupCollection collGroup = clientContext.Web.SiteGroups;
clientContext.Load(collGroup);
clientContext.ExecuteQuery();
Group newGrp = collGroup.Where(g => g.Title == "TitleOfGroup").FirstOrDefault();
if (newGrp != null)
{
    // Add new group logic
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.