Does anyone know how to add an existing group in AD to a Sharepoint 2010 list?
So far I've only seen how to add a Sharepoint group, but I need to add an AD group.
using (var ctx = new SharepointClient.ClientContext(sharepointSiteUrl))
{
var groupCreationInfo = new Microsoft.SharePoint.Client.GroupCreationInformation
{
Title = "Nome do Grupo",
Description = "Descrição do grupo"
};
var groupOwner = ctx.Web.SiteGroups.GetByName("GrupoSharepoint");
var group = ctx.Web.SiteGroups.Add(groupCreationInfo);
group.Owner = groupOwner;
group.Update();
ctx.ExecuteQuery();
}