Interface ISite
Public interface to define a Site object of SharePoint Online
Assembly: PnP.Core.dll
Syntax
public interface ISite : IDataModel<ISite>, IDataModelParent, IDataModelWithContext, ISupportModules<ISite>, IDataModelGet<ISite>, IDataModelLoad<ISite>, IDataModelUpdate, IDataModelSupportingGetChanges
Properties
A special property used to add an asterisk to a $select statement
Declaration
Property Value
Gets or sets a value that specifies whether the creation of declarative workflows is allowed on this site collection.
Declaration
bool AllowCreateDeclarativeWorkflow { get; set; }
Property Value
Gets or sets a value that specifies whether a designer can be used on this site collection.
Declaration
bool AllowDesigner { get; set; }
Property Value
Gets or sets a value that specifies whether external embedding wrapper is allowed on this site collection.
0 means "Don't allow embedding any external domains"
1 means "Only allow embedding external domains from allow-embed-domains-list"
2 means "Allow embedding any external domains"
Declaration
int AllowExternalEmbeddingWrapper { get; set; }
Property Value
Gets or sets a value that specifies whether master page editing is allowed on this site collection.
Declaration
bool AllowMasterPageEditing { get; set; }
Property Value
Gets or sets a value that specifies whether this site collection can be reverted to its base template.
Declaration
bool AllowRevertFromTemplate { get; set; }
Property Value
Gets or sets a value that specifies whether it is allowed to save declarative workflows as template on this site collection.
Declaration
bool AllowSaveDeclarativeWorkflowAsTemplate { get; set; }
Property Value
Gets or sets a value that specifies whether it is allowed to save and publish declarative workflows on this site collection.
Declaration
bool AllowSavePublishDeclarativeWorkflow { get; set; }
Property Value
Declaration
IWebCollection AllWebs { get; }
Property Value
This is the number of days of audit log data to retain. If unset and
audit trimming is enabled, the retention defaults default configured schedule for trimming
Declaration
int AuditLogTrimmingRetention { get; set; }
Property Value
Gets or sets value if syncing hub site permissions to this associated site is allowed.
Declaration
bool CanSyncHubSitePermissions { get; set; }
Property Value
Gets the ID of the Modern Group associated with this site.
Declaration
Guid ChannelGroupId { get; }
Property Value
The Classification of the Site object
Declaration
string Classification { get; set; }
Property Value
Sets whether or not to disable app views for all child webs.
True means app views are disabled throughout the site collection; False otherwise.
Declaration
bool DisableAppViews { get; set; }
Property Value
Sets whether or not to disable company sharing links for all child webs.
True means companywide sharing links are disabled throughout the site collection, regardless of the settings on the root or child webs.
False means each web can individually decide whether to turn on or off companywide sharing links.
Declaration
bool DisableCompanyWideSharingLinks { get; set; }
Property Value
Sets whether or not to disable Flows for all child webs.
True means Flows are disabled throughout the site collection; False otherwise.
Declaration
bool DisableFlows { get; set; }
Property Value
Declaration
IEventReceiverDefinitionCollection EventReceivers { get; }
Property Value
Gets a boolean value that specifies whether users will be greeted with a notification bar
telling them that the site can be shared with external users.
True - notification bar is enabled; False - otherwise
Declaration
bool ExternalSharingTipsEnabled { get; }
Property Value
Property that indicates the default number of days an external user will expire in.
0 if the policy is disabled or unavailable, otherwise the number of days
Declaration
int ExternalUserExpirationInDays { get; }
Property Value
Declaration
IFeatureCollection Features { get; }
Property Value
returns the Geo Location hosting this site collection
Declaration
string GeoLocation { get; }
Property Value
The unique ID of the associated Microsoft 365 Group (if any)
Declaration
Property Value
Gets the ID of the HubSite this site is associated with.
Declaration
Property Value
Gets the synchronizable visitor group for a hub site
Declaration
ISharePointGroup HubSiteSynchronizableVisitorGroup { get; }
Property Value
The Unique ID of the Site object
Declaration
Property Value
Returns whether or not this site is a HubSite. Hub sites can be associated with one or more sites.
Declaration
Property Value
Gets the comment that is used in locking a site collection.
Declaration
string LockIssue { get; }
Property Value
Maximum items that will not be throttled per operation.
Declaration
int MaxItemsPerThrottledOperation { get; }
Property Value
Gets or sets a bool value that specifies whether the site collection is read-only, locked, and unavailable for write access.
Declaration
bool ReadOnly { get; set; }
Property Value
Declaration
IRecycleBinItemCollection RecycleBin { get; }
Property Value
The RootWeb of the Site object
Declaration
Property Value
Whether suite nav search box is shown on modern and classic pages
Declaration
SearchBoxInNavBar SearchBoxInNavBar { get; set; }
Property Value
Search placeholder text for search box in navbar - overrides default placeholder text if set.
Declaration
string SearchBoxPlaceholderText { get; set; }
Property Value
Information Protection Label Id for an individual site collection
Declaration
string SensitivityLabel { get; }
Property Value
Gets the Information Protection Label Id for an individual site collection.
Declaration
Guid SensitivityLabelId { get; }
Property Value
Gets the server-relative URL of the root Web site in the site collection.
Declaration
string ServerRelativeUrl { get; }
Property Value
ShareByEmailEnabled when true means that user's will be able to grant permissions to guests for resources within the site collection
Declaration
bool ShareByEmailEnabled { get; set; }
Property Value
Property that indicates whether users will be able to share links to documents that can be accessed without logging in.
Declaration
bool ShareByLinkEnabled { get; }
Property Value
Gets or sets a value that specifies whether guest users should be displayed as suggestions in people picker on this site collection.
Declaration
bool ShowPeoplePickerSuggestionsForGuestUsers { get; set; }
Property Value
Defines whether social bar is disabled on Site Pages in this site collection
Declaration
bool SocialBarOnSitePagesDisabled { get; set; }
Property Value
Gets or sets a value that specifies the status bar link on this site collection (sets the SiteStatusBarLink property on the root web).
Declaration
string StatusBarLink { get; set; }
Property Value
Gets or sets a value that specifies the text of the status bar on this site collection (sets the SiteStatusBarText property on the root web).
Declaration
string StatusBarText { get; set; }
Property Value
Gets a value that indicates whether thicket support is disabled on this site collection.
Declaration
bool ThicketSupportDisabled { get; }
Property Value
When this flag is set for the site, the audit events are trimmed periodically.
Declaration
bool TrimAuditLog { get; set; }
Property Value
The URL of the Site object
Declaration
Property Value
Declaration
IUserCustomActionCollection UserCustomActions { get; }
Property Value
Methods
Creates a new migration job
Array of the objects to migrate (absolute url to the file / folder)
Destination URI to where the objects have to be migrated
Migration options
Defines if we have to wait until all the migrations have finished
Duration between every GetCopyJobProgress call in seconds. Defaults to 1.
List of all the jobs being created (one for every exportObjectUri)
Declaration
IList<ICopyMigrationInfo> CreateCopyJobs(string[] exportObjectUris, string destinationUri, CopyMigrationOptions options, bool waitUntilFinished = false, int waitAfterStatusCheck = 1)
Parameters
System.String[]
exportObjectUris
|
System.String
destinationUri
|
CopyMigrationOptions
options
|
System.Boolean
waitUntilFinished
|
System.Int32
waitAfterStatusCheck
|
Returns
Creates a new migration job
Array of the objects to migrate (absolute url to the file / folder)
Destination URI to where the objects have to be migrated
Migration options
Defines if we have to wait until all the migrations have finished
Duration between every GetCopyJobProgress call in seconds. Defaults to 1.
List of all the jobs being created (one for every exportObjectUri)
Declaration
Task<IList<ICopyMigrationInfo>> CreateCopyJobsAsync(string[] exportObjectUris, string destinationUri, CopyMigrationOptions options, bool waitUntilFinished = false, int waitAfterStatusCheck = 1)
Parameters
System.String[]
exportObjectUris
|
System.String
destinationUri
|
CopyMigrationOptions
options
|
System.Boolean
waitUntilFinished
|
System.Int32
waitAfterStatusCheck
|
Returns
Ensures that a migration job has completely run
List of migration jobs to check the process of
Duration between every GetCopyJobProgress call in seconds. Defaults to 1.
Declaration
void EnsureCopyJobHasFinished(IList<ICopyMigrationInfo> copyMigrationInfos, int waitAfterStatusCheck = 1)
Parameters
PnP.Core.Model.SharePoint.IList<ICopyMigrationInfo>
copyMigrationInfos
|
System.Int32
waitAfterStatusCheck
|
Ensures that a migration job has completely run
List of migration jobs to check the process of
Duration between every GetCopyJobProgress call in seconds. Defaults to 1.
Declaration
Task EnsureCopyJobHasFinishedAsync(IList<ICopyMigrationInfo> copyMigrationInfos, int waitAfterStatusCheck = 1)
Parameters
PnP.Core.Model.SharePoint.IList<ICopyMigrationInfo>
copyMigrationInfos
|
System.Int32
waitAfterStatusCheck
|
Returns
Declaration
List<IActivityStat> GetAnalytics(AnalyticsOptions options = null)
Parameters
Returns
PnP.Core.Model.SharePoint.List<IActivityStat>
The requested analytics data
|
Declaration
Task<List<IActivityStat>> GetAnalyticsAsync(AnalyticsOptions options = null)
Parameters
Returns
Task<PnP.Core.Model.SharePoint.List<IActivityStat>>
The requested analytics data
|
Gets the progress of an existing migration info object
Migration job to get the progress of
Progress of the copy job
Declaration
ICopyJobProgress GetCopyJobProgress(ICopyMigrationInfo copyMigrationInfo)
Parameters
Returns
Gets the progress of an existing migration info object
Migration job to get the progress of
Progress of the copy job
Declaration
Task<ICopyJobProgress> GetCopyJobProgressAsync(ICopyMigrationInfo copyMigrationInfo)
Parameters
Returns
Gets hubsite data from the current site OR another specified hub site ID
Declaration
IHubSite GetHubSiteData(Guid? id)
Parameters
System.Nullable<Guid>
id
Hub Site Guid
|
Returns
Gets hubsite data from the current site OR another specified hub site ID
Declaration
Task<IHubSite> GetHubSiteDataAsync(Guid? id)
Parameters
System.Nullable<Guid>
id
Hub Site Guid
|
Returns
Gets the managed properties from the search configuration of this site
Declaration
List<IManagedProperty> GetSearchConfigurationManagedProperties()
Returns
Gets the managed properties from the search configuration of this site
Declaration
Task<List<IManagedProperty>> GetSearchConfigurationManagedPropertiesAsync()
Returns
Task<PnP.Core.Model.SharePoint.List<IManagedProperty>>
List of managed properties
|
Gets the search configuration of the web
Declaration
string GetSearchConfigurationXml()
Returns
System.String
Search configuration XML
|
Gets the search configuration of the web
Declaration
Task<string> GetSearchConfigurationXmlAsync()
Returns
Task<System.String>
Search configuration XML
|
Checks if current site is a HomeSite
Declaration
Returns
Checks if current site is a HomeSite
Declaration
Task<bool> IsHomeSiteAsync()
Returns
Associates the current site to a primary hub site
Declaration
bool JoinHubSite(Guid hubSiteId)
Parameters
Returns
Associates the current site to a primary hub site
Declaration
Task<bool> JoinHubSiteAsync(Guid hubSiteId)
Parameters
Returns
Registers the current site as a primary hub site
Declaration
IHubSite RegisterHubSite()
Returns
Registers the current site as a primary hub site
Declaration
Task<IHubSite> RegisterHubSiteAsync()
Returns
Sets the search configuration for the site
Declaration
void SetSearchConfigurationXml(string configuration)
Parameters
Sets the search configuration for the site
Declaration
Task SetSearchConfigurationXmlAsync(string configuration)
Parameters
Returns
Disassociates current site from primary hub site
Declaration
Returns
Disassociates current site from primary hub site
Declaration
Task<bool> UnJoinHubSiteAsync()
Returns
Unregisters the current site as a primary hub site
Declaration
Returns
Unregisters the current site as a primary hub site
Declaration
Task<bool> UnregisterHubSiteAsync()
Returns
Extension Methods