Hi All,
I am trying to create a new subsite in sharepoint 2013 using CSOM (code is mentioned below). But no default groups (MEMBER, VISITOR, OWNER) are getting created in that site. When we try through UI we will got through a page "Set Up Groups
for this Site" where we can specify these details.. Is it possible to do the same (creating default groups together with the site creation) through CSOM or powershell.
CSOM code:
WebCreationInformation creation = new WebCreationInformation();
creation.Url = "NewSubSite6";
creation.Title = "NewSubSite6";
creation.UseSamePermissionsAsParentSite = false;
Web newWeb = clientContext.Web.Webs.Add(creation);
//clientContext.Load(newWeb);
clientContext.ExecuteQuery();
Regards,
Shahabas