Interface ISite
- Namespace
- PnP.Core.Model.SharePoint
- Assembly
- PnP.Core.dll
Public interface to define a Site object of SharePoint Online
public interface ISite : IDataModel<ISite>, IDataModelParent, IDataModelWithContext, ISupportModules<ISite>, IDataModelGet<ISite>, IDataModelLoad<ISite>, IDataModelUpdate, IDataModelSupportingGetChanges
- Inherited Members
- Extension Methods
Properties
All
A special property used to add an asterisk to a $select statement
object All { get; }
Property Value
AllWebs
Collection of sub-webs in the current Site object
Implements IQueryable<T>.
See Requesting model collections
and IQueryable performance considerations to learn more.
IWebCollection AllWebs { get; }
Property Value
AllowCreateDeclarativeWorkflow
Gets or sets a value that specifies whether the creation of declarative workflows is allowed on this site collection.
bool AllowCreateDeclarativeWorkflow { get; set; }
Property Value
AllowDesigner
Gets or sets a value that specifies whether a designer can be used on this site collection.
bool AllowDesigner { get; set; }
Property Value
AllowExternalEmbeddingWrapper
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"
int AllowExternalEmbeddingWrapper { get; set; }
Property Value
AllowMasterPageEditing
Gets or sets a value that specifies whether master page editing is allowed on this site collection.
bool AllowMasterPageEditing { get; set; }
Property Value
AllowRevertFromTemplate
Gets or sets a value that specifies whether this site collection can be reverted to its base template.
bool AllowRevertFromTemplate { get; set; }
Property Value
AllowSaveDeclarativeWorkflowAsTemplate
Gets or sets a value that specifies whether it is allowed to save declarative workflows as template on this site collection.
bool AllowSaveDeclarativeWorkflowAsTemplate { get; set; }
Property Value
AllowSavePublishDeclarativeWorkflow
Gets or sets a value that specifies whether it is allowed to save and publish declarative workflows on this site collection.
bool AllowSavePublishDeclarativeWorkflow { get; set; }
Property Value
AuditLogTrimmingRetention
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
int AuditLogTrimmingRetention { get; set; }
Property Value
CanSyncHubSitePermissions
Gets or sets value if syncing hub site permissions to this associated site is allowed.
bool CanSyncHubSitePermissions { get; set; }
Property Value
ChannelGroupId
Gets the ID of the Modern Group associated with this site.
Guid ChannelGroupId { get; }
Property Value
Classification
The Classification of the Site object
string Classification { get; set; }
Property Value
CommentsOnSitePagesDisabled
Gets or sets a value that specifies whether the comments on site pages are disabled on this site collection.
bool CommentsOnSitePagesDisabled { get; set; }
Property Value
DisableAppViews
Sets whether or not to disable app views for all child webs. True means app views are disabled throughout the site collection; False otherwise.
bool DisableAppViews { get; set; }
Property Value
DisableCompanyWideSharingLinks
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.
bool DisableCompanyWideSharingLinks { get; set; }
Property Value
DisableFlows
Sets whether or not to disable Flows for all child webs. True means Flows are disabled throughout the site collection; False otherwise.
bool DisableFlows { get; set; }
Property Value
EventReceivers
Event Receivers defined in this web
Implements IQueryable<T>.
See Requesting model collections
and IQueryable performance considerations to learn more.
IEventReceiverDefinitionCollection EventReceivers { get; }
Property Value
ExternalSharingTipsEnabled
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
bool ExternalSharingTipsEnabled { get; }
Property Value
ExternalUserExpirationInDays
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
int ExternalUserExpirationInDays { get; }
Property Value
Features
Collection of features enabled for the site
Implements IQueryable<T>.
See Requesting model collections
and IQueryable performance considerations to learn more.
IFeatureCollection Features { get; }
Property Value
GeoLocation
returns the Geo Location hosting this site collection
string GeoLocation { get; }
Property Value
GroupId
The unique ID of the associated Microsoft 365 Group (if any)
Guid GroupId { get; }
Property Value
HubSiteId
Gets the ID of the HubSite this site is associated with.
Guid HubSiteId { get; }
Property Value
Remarks
Use JoinHubSite method to change the value of this property.
HubSiteSynchronizableVisitorGroup
Gets the synchronizable visitor group for a hub site
ISharePointGroup HubSiteSynchronizableVisitorGroup { get; }
Property Value
Id
The Unique ID of the Site object
Guid Id { get; }
Property Value
IsHubSite
Returns whether or not this site is a HubSite. Hub sites can be associated with one or more sites.
bool IsHubSite { get; }
Property Value
LockIssue
Gets the comment that is used in locking a site collection.
string LockIssue { get; }
Property Value
MaxItemsPerThrottledOperation
Maximum items that will not be throttled per operation.
int MaxItemsPerThrottledOperation { get; }
Property Value
ReadOnly
Gets or sets a bool value that specifies whether the site collection is read-only, locked, and unavailable for write access.
bool ReadOnly { get; set; }
Property Value
RecycleBin
Gets a value that specifies the collection of Recycle Bin items for the site collection.
Implements IQueryable<T>.
See Requesting model collections
and IQueryable performance considerations to learn more.
IRecycleBinItemCollection RecycleBin { get; }
Property Value
RelatedGroupId
Gets the ID of the Modern Group related to this site.
Guid RelatedGroupId { get; }
Property Value
RootWeb
The RootWeb of the Site object
IWeb RootWeb { get; }
Property Value
SearchBoxInNavBar
Whether suite nav search box is shown on modern and classic pages
SearchBoxInNavBar SearchBoxInNavBar { get; set; }
Property Value
SearchBoxPlaceholderText
Search placeholder text for search box in navbar - overrides default placeholder text if set.
string SearchBoxPlaceholderText { get; set; }
Property Value
SensitivityLabel
Information Protection Label Id for an individual site collection
string SensitivityLabel { get; }
Property Value
SensitivityLabelId
Gets the Information Protection Label Id for an individual site collection.
Guid SensitivityLabelId { get; }
Property Value
ServerRelativeUrl
Gets the server-relative URL of the root Web site in the site collection.
string ServerRelativeUrl { get; }
Property Value
ShareByEmailEnabled
ShareByEmailEnabled when true means that user's will be able to grant permissions to guests for resources within the site collection
bool ShareByEmailEnabled { get; set; }
Property Value
ShareByLinkEnabled
Property that indicates whether users will be able to share links to documents that can be accessed without logging in.
bool ShareByLinkEnabled { get; }
Property Value
ShowPeoplePickerSuggestionsForGuestUsers
Gets or sets a value that specifies whether guest users should be displayed as suggestions in people picker on this site collection.
bool ShowPeoplePickerSuggestionsForGuestUsers { get; set; }
Property Value
SocialBarOnSitePagesDisabled
Defines whether social bar is disabled on Site Pages in this site collection
bool SocialBarOnSitePagesDisabled { get; set; }
Property Value
StatusBarLink
Gets or sets a value that specifies the status bar link on this site collection (sets the SiteStatusBarLink property on the root web).
string StatusBarLink { get; set; }
Property Value
StatusBarText
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).
string StatusBarText { get; set; }
Property Value
ThicketSupportDisabled
Gets a value that indicates whether thicket support is disabled on this site collection.
bool ThicketSupportDisabled { get; }
Property Value
TrimAuditLog
When this flag is set for the site, the audit events are trimmed periodically.
bool TrimAuditLog { get; set; }
Property Value
Url
The URL of the Site object
Uri Url { get; }
Property Value
UserCustomActions
Gets a value that specifies the collection of user custom actions for the site collection.
Implements IQueryable<T>.
See Requesting model collections
and IQueryable performance considerations to learn more.
IUserCustomActionCollection UserCustomActions { get; }
Property Value
Methods
CreateCopyJobs(string[], string, CopyMigrationOptions, bool, int)
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.IList<ICopyMigrationInfo> CreateCopyJobs(string[] exportObjectUris, string destinationUri, CopyMigrationOptions options, bool waitUntilFinished = false, int waitAfterStatusCheck = 1)
Parameters
exportObjectUrisstring[]destinationUristringoptionsCopyMigrationOptionswaitUntilFinishedboolwaitAfterStatusCheckint
Returns
CreateCopyJobsAsync(string[], string, CopyMigrationOptions, bool, int)
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.Task<IList<ICopyMigrationInfo>> CreateCopyJobsAsync(string[] exportObjectUris, string destinationUri, CopyMigrationOptions options, bool waitUntilFinished = false, int waitAfterStatusCheck = 1)
Parameters
exportObjectUrisstring[]destinationUristringoptionsCopyMigrationOptionswaitUntilFinishedboolwaitAfterStatusCheckint
Returns
EnsureCopyJobHasFinished(IList<ICopyMigrationInfo>, int)
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.void EnsureCopyJobHasFinished(IList<ICopyMigrationInfo> copyMigrationInfos, int waitAfterStatusCheck = 1)
Parameters
copyMigrationInfosIList<ICopyMigrationInfo>waitAfterStatusCheckint
EnsureCopyJobHasFinishedAsync(IList<ICopyMigrationInfo>, int)
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.Task EnsureCopyJobHasFinishedAsync(IList<ICopyMigrationInfo> copyMigrationInfos, int waitAfterStatusCheck = 1)
Parameters
copyMigrationInfosIList<ICopyMigrationInfo>waitAfterStatusCheckint
Returns
GetAnalytics(AnalyticsOptions)
Gets site analytics
List<IActivityStat> GetAnalytics(AnalyticsOptions options = null)
Parameters
optionsAnalyticsOptionsDefines which analytics are needed
Returns
- List<IActivityStat>
The requested analytics data
GetAnalyticsAsync(AnalyticsOptions)
Gets site analytics
Task<List<IActivityStat>> GetAnalyticsAsync(AnalyticsOptions options = null)
Parameters
optionsAnalyticsOptionsDefines which analytics are needed
Returns
- Task<List<IActivityStat>>
The requested analytics data
GetAvailableComplianceTags()
Retrieves the available compliance tags / retention labels for this site
IEnumerable<IComplianceTag> GetAvailableComplianceTags()
Returns
GetAvailableComplianceTagsAsync()
Retrieves the available compliance tags / retention labels for this site
Task<IEnumerable<IComplianceTag>> GetAvailableComplianceTagsAsync()
Returns
GetCopyJobProgress(ICopyMigrationInfo)
Gets the progress of an existing migration info object
Migration job to get the progress ofICopyJobProgress GetCopyJobProgress(ICopyMigrationInfo copyMigrationInfo)
Parameters
copyMigrationInfoICopyMigrationInfo
Returns
GetCopyJobProgressAsync(ICopyMigrationInfo)
Gets the progress of an existing migration info object
Migration job to get the progress ofTask<ICopyJobProgress> GetCopyJobProgressAsync(ICopyMigrationInfo copyMigrationInfo)
Parameters
copyMigrationInfoICopyMigrationInfo
Returns
GetHubSiteData(Guid?)
Gets hubsite data from the current site OR another specified hub site ID
IHubSite GetHubSiteData(Guid? id)
Parameters
idGuid?Hub Site Guid
Returns
GetHubSiteDataAsync(Guid?)
Gets hubsite data from the current site OR another specified hub site ID
Task<IHubSite> GetHubSiteDataAsync(Guid? id)
Parameters
idGuid?Hub Site Guid
Returns
GetSearchConfigurationManagedProperties()
Gets the managed properties from the search configuration of this site
List<IManagedProperty> GetSearchConfigurationManagedProperties()
Returns
- List<IManagedProperty>
List of managed properties
GetSearchConfigurationManagedPropertiesAsync()
Gets the managed properties from the search configuration of this site
Task<List<IManagedProperty>> GetSearchConfigurationManagedPropertiesAsync()
Returns
- Task<List<IManagedProperty>>
List of managed properties
GetSearchConfigurationXml()
Gets the search configuration of the web
string GetSearchConfigurationXml()
Returns
- string
Search configuration XML
GetSearchConfigurationXmlAsync()
Gets the search configuration of the web
Task<string> GetSearchConfigurationXmlAsync()
Returns
IsHomeSite()
Checks if current site is a HomeSite
bool IsHomeSite()
Returns
IsHomeSiteAsync()
Checks if current site is a HomeSite
Task<bool> IsHomeSiteAsync()
Returns
JoinHubSite(Guid)
Associates the current site to a primary hub site
bool JoinHubSite(Guid hubSiteId)
Parameters
hubSiteIdGuid
Returns
JoinHubSiteAsync(Guid)
Associates the current site to a primary hub site
Task<bool> JoinHubSiteAsync(Guid hubSiteId)
Parameters
hubSiteIdGuid
Returns
RegisterHubSite()
Registers the current site as a primary hub site
IHubSite RegisterHubSite()
Returns
RegisterHubSiteAsync()
Registers the current site as a primary hub site
Task<IHubSite> RegisterHubSiteAsync()
Returns
SetSearchConfigurationXml(string)
Sets the search configuration for the site
void SetSearchConfigurationXml(string configuration)
Parameters
configurationstringSearch configuration, obtained via GetSearchConfigurationXml() to apply
SetSearchConfigurationXmlAsync(string)
Sets the search configuration for the site
Task SetSearchConfigurationXmlAsync(string configuration)
Parameters
configurationstringSearch configuration, obtained via GetSearchConfigurationXml() to apply
Returns
UnJoinHubSite()
Disassociates current site from primary hub site
bool UnJoinHubSite()
Returns
UnJoinHubSiteAsync()
Disassociates current site from primary hub site
Task<bool> UnJoinHubSiteAsync()
Returns
UnregisterHubSite()
Unregisters the current site as a primary hub site
bool UnregisterHubSite()
Returns
UnregisterHubSiteAsync()
Unregisters the current site as a primary hub site
Task<bool> UnregisterHubSiteAsync()