Setting a default group for a SharePoint site

Using the web interface, you can set the group as the default group for the site by choosing "Settings" → "Set as default group" in the list view for the group.

Is there a way to do this programmatically using SharePoint Web Services or a new client object model?

+3
source share
1 answer

This parameter sets the SPWeb.AssociatedMemberGroup property :

using (SPWeb web = ...)
{
  web.AssociatedMemberGroup = someGroup;
  web.Update();
}

You can use .NET Reflector to test it yourself - decompile the assembly Microsoft.SharePoint.ApplicationPages.dlland find the method BtnMakeDefaultGroup_Clickin the class PeoplePage.

+4
source

Source: https://habr.com/ru/post/1795397/


All Articles