Table of contents
TOC
Collapse the table of content
Expand the table of content

TenantExtensions.CreateSiteCollection Method

SharePoint Dev Documents|Last Updated: 6/19/2017
|
1 Contributor

Launches a site collection creation and waits for the creation to finish

Namespace:Microsoft.SharePoint.Client
Assembly: OfficeDevPnP.Core.dll

Syntax

public static Guid CreateSiteCollection(this Tenant tenant, String siteFullUrl, String title, String siteOwnerLogin, String template, Int32 storageMaximumLevel, Int32 storageWarningLevel, Int32 timeZoneId, Int32 userCodeMaximumLevel, Int32 userCodeWarningLevel, UInt32 lcid, Boolean removeFromRecycleBin = False, Boolean wait = True, Func<TenantOperationMessage, Boolean> timeoutFunction)

Parameters

tenant

  Type: Microsoft.Online.SharePoint.TenantAdministration.Tenant
  A tenant object pointing to the context of a Tenant Administration site

siteFullUrl

  Type: System.String
  The SPO url

title

  Type: System.String
  The site title

siteOwnerLogin

  Type: System.String
  Owner account

template

  Type: System.String
  Site template being used

storageMaximumLevel

  Type: System.Int32
  Site quota in MB

storageWarningLevel

  Type: System.Int32
  Site quota warning level in MB

timeZoneId

  Type: System.Int32
  TimeZoneID for the site. "(UTC+01:00) Brussels, Copenhagen, Madrid, Paris" = 3

userCodeMaximumLevel

  Type: System.Int32
  The user code quota in points

userCodeWarningLevel

  Type: System.Int32
  The user code quota warning level in points

lcid

  Type: System.UInt32
  The site locale. See http://technet.microsoft.com/en-us/library/ff463597.aspx for a complete list of Lcid's

(optional) removeFromRecycleBin

  Type: System.Boolean
  If true, any existing site with the same URL will be removed from the recycle bin

(optional) wait

  Type: System.Boolean
  Wait for the site to be created before continuing processing

(optional) timeoutFunction

  Type: System.Func<OfficeDevPnP.Core.TenantOperationMessage, System.Boolean>
  An optional function that will be called while waiting for the site to be created. If set will override the wait variable. Return true to cancel the wait loop.

Return Value

Type: Guid
Guid of the created site collection and Guid.Empty is the wait parameter is specified as false. Returns Guid.Empty if the wait is cancelled.

See also

© 2018 Microsoft