Allow or prevent users from creating sites and subsites in SharePoint Online

Go to SharePoint Online Admin Center.
Click on settings on left navigation bar.
Go to Site Creation and SubSite Creation Section.

Site Creation

You can either Hide the Create site command or show it.

If you select Show the Create site command, other options will be enabled and you can select the type of site that users can create. It will display the Create Site command on SharePoint Home Page and in the sites list in OneDrive so users can create new sites.

When users select Create site command, user can either create a new team site/communication site or a classic team site.

If user selects to create a new team site/communication site, it let user create an Office 365 group-connected team site or a communication site under /sites or /teams. Users who don’t have permission to create Office 365 groups can still create new team site without Office 365 groups. You can also decide whether Secondary contact is required or not. To let users create site from a custom form you have created, check the Use the form at this URL checkbox and enter the UR in the textbox.

If user selects second option, it will create a default classic team subsite or sites from the custom form. Specify where sites are created, Site Classification (Hidden from users, an optional choice, a required choice) and secondary contact is required or not.

SubSite Creation

You can select whether users can create subsites only for classic sites, for all sites or not create subsites.

Create Site Collection in SharePoint Online

Below are the steps to create a Site Collection in SharePoint Online:

  • Login to https://portal.office.com with your UserName and Password.
  • You will redirected to a page from where you can choose various apps to work with. Lets choose Admin to open the Central Administration of SharePoint Online.
  • Select SharePoint by following the below pic.
  • Go to Site Collection –> New. Click on Private Site Collection.
  • Enter the details to create a Site Collection. Choose Team Site as the template as of now. Once done, click OK.

  • You will be redirected to SharePoint Admin Center where your Site Collection’s name will be listed.
  • You can copy the URL and paste it in another browser tab.
  • You have just created a Site Collection which you can start using. Below is the home page of your newly created Site Collection.

Server Object Model – Sample Codes

I have created a Windows Forms Application to demonstrate the sample codes for Server Object Model using C# coding. Please include Microsoft.SharePoint and Microsoft.SharePoint.Administration DLLs in the project. These are available at “C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI” folder. You can make changes to the form as per your requirement.

Sample Codes

Read Site Collection’s Title and Description.
You can access various properties of a Web. Below is a sample code:

public void getWebTitleDesc(string siteURL)
{
       using(SPSite site=new SPSite(siteURL))
       {
           using(SPWeb web=site.OpenWeb())
           {
               textBox1.Text = web.Title;
               textBox2.Text = web.Description;
           }
       }
}

Continue reading “Server Object Model – Sample Codes”

Create Site Collection through Central Administration

Below are the steps to create Site Collection through Central Administration:

1. Login to Central Administration.
2. Go to Application Management –> Create Site Collection.
3. You will see the below screen.

Continue reading “Create Site Collection through Central Administration”

Power Platform Academy

Start or Upgrade your Career with Power Platform

Learn with Akanksha

Python | Azure | AI/ML | OpenAI | MLOps

Design a site like this with WordPress.com
Get started