Table of Contents

Interface IWeb

Namespace
PnP.Core.Model.SharePoint
Assembly
PnP.Core.dll

Public interface to define a Web object of SharePoint Online

public interface IWeb : IDataModel<IWeb>, IDataModelParent, IDataModelWithContext, ISupportModules<IWeb>, IDataModelGet<IWeb>, IDataModelLoad<IWeb>, IDataModelUpdate, IDataModelDelete, IDataModelSupportingGetChanges, ISecurableObject, IQueryableDataModel
Inherited Members
Extension Methods

Properties

AccessRequestListUrl

Gets the URL of the access request list to the current site.

string AccessRequestListUrl { get; }

Property Value

string

AccessRequestSiteDescription

Gets or sets the description of the access request to this site.

string AccessRequestSiteDescription { get; set; }

Property Value

string

Alerts

Get the collection of alerts for the current Web site.

IAlertCollection Alerts { get; }

Property Value

IAlertCollection

All

A special property used to add an asterisk to a $select statement

object All { get; }

Property Value

object

AllProperties

Gets a collection of metadata for the Web site.

IPropertyValues AllProperties { get; }

Property Value

IPropertyValues

AllowAutomaticASPXPageIndexing

Gets a value that specifies whether the automatic ASPX page indexed is allowed.

bool AllowAutomaticASPXPageIndexing { get; set; }

Property Value

bool

AllowCreateDeclarativeWorkflowForCurrentUser

Gets a value that specifies whether the current user is allowed to create declarative workflow on this site.

bool AllowCreateDeclarativeWorkflowForCurrentUser { get; set; }

Property Value

bool

AllowDesignerForCurrentUser

Gets a value that specifies whether the current user is allowed to use a designer application to customize this site.

bool AllowDesignerForCurrentUser { get; set; }

Property Value

bool

AllowMasterPageEditingForCurrentUser

Gets a value that specifies whether the current user is allowed to edit the master page.

bool AllowMasterPageEditingForCurrentUser { get; }

Property Value

bool

AllowRevertFromTemplateForCurrentUser

Gets a value that specifies whether the current user is allowed to revert the site to a default site template.

bool AllowRevertFromTemplateForCurrentUser { get; }

Property Value

bool

AllowRssFeeds

Gets a value that specifies whether the site allows RSS feeds.

bool AllowRssFeeds { get; }

Property Value

bool

AllowSaveDeclarativeWorkflowAsTemplateForCurrentUser

Gets a value that specifies whether the current user is allowed to save declarative workflows as template.

bool AllowSaveDeclarativeWorkflowAsTemplateForCurrentUser { get; }

Property Value

bool

AllowSavePublishDeclarativeWorkflowForCurrentUser

Gets a value that specifies whether the current user is allowed to publish a declarative workflow.

bool AllowSavePublishDeclarativeWorkflowForCurrentUser { get; }

Property Value

bool

AlternateCssUrl

The AlternateCSS of the Site, optional attribute.

string AlternateCssUrl { get; set; }

Property Value

string

AppInstanceId

The instance Id of the App Instance that this website represents.

Guid AppInstanceId { get; }

Property Value

Guid

AssociatedMemberGroup

Associated SharePoint Member group

ISharePointGroup AssociatedMemberGroup { get; }

Property Value

ISharePointGroup

AssociatedOwnerGroup

Associated SharePoint owner group

ISharePointGroup AssociatedOwnerGroup { get; }

Property Value

ISharePointGroup

AssociatedVisitorGroup

Associated SharePoint Visitor group

ISharePointGroup AssociatedVisitorGroup { get; }

Property Value

ISharePointGroup

Author

Gets the web's author

ISharePointUser Author { get; }

Property Value

ISharePointUser

AvailableContentTypes

Gets the collection of all content types that apply to the current scope, including those of the current Web site, as well as any parent Web sites. Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

IContentTypeCollection AvailableContentTypes { get; }

Property Value

IContentTypeCollection

AvailableFields

Gets a value that specifies the collection of all fields available for the current scope, including those of the current site, as well as any parent sites. Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

IFieldCollection AvailableFields { get; }

Property Value

IFieldCollection

CommentsOnSitePagesDisabled

Defines whether the comments on site pages are disabled or not

bool CommentsOnSitePagesDisabled { get; set; }

Property Value

bool

ContainsConfidentialInfo

Gets a boolean value that specifies whether the site contains highly confidential information. If the tenant settings don't allow tagging sites as confidential, this property will always return false.

bool ContainsConfidentialInfo { get; set; }

Property Value

bool

ContentTypes

Collection of content types in the current Web object Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

IContentTypeCollection ContentTypes { get; }

Property Value

IContentTypeCollection

Created

Gets a value that specifies when the site was created.

DateTime Created { get; }

Property Value

DateTime

CurrentUser

Gets the current user in the current context

ISharePointUser CurrentUser { get; }

Property Value

ISharePointUser

CustomMasterUrl

The Custom MasterPage Url of the Site, optional attribute.

string CustomMasterUrl { get; set; }

Property Value

string

DefaultNewPageTemplateId

The id of the default new page template. Use SetDefaultNewPageTemplateId to set the value.

Guid DefaultNewPageTemplateId { get; set; }

Property Value

Guid

Description

The Description of the Site, optional attribute.

string Description { get; set; }

Property Value

string

DesignPackageId

Gets or sets the design package Id of this site.

Guid DesignPackageId { get; set; }

Property Value

Guid

DisableAppViews

Defines whether disable PowerApps for the current web

bool DisableAppViews { get; set; }

Property Value

bool

DisableFlows

Defines whether disable flows for the current web

bool DisableFlows { get; set; }

Property Value

bool

DisableRecommendedItems

Gets or sets whether the recommended items are disabled on this site.

bool DisableRecommendedItems { get; set; }

Property Value

bool

DocumentLibraryCalloutOfficeWebAppPreviewersDisabled

Determines if the Document Library Callout's WAC previewers are enabled or not.

bool DocumentLibraryCalloutOfficeWebAppPreviewersDisabled { get; }

Property Value

bool

EffectiveBasePermissions

Get's the permission levels set on this web

IBasePermissions EffectiveBasePermissions { get; }

Property Value

IBasePermissions

EnableMinimalDownload

Gets or sets a Boolean value that specifies whether the Web site should use Minimal Download Strategy.

bool EnableMinimalDownload { get; set; }

Property Value

bool

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

IEventReceiverDefinitionCollection

ExcludeFromOfflineClient

Defines whether to exclude the web from offline client

bool ExcludeFromOfflineClient { get; set; }

Property Value

bool

Features

Collection of features enabled for the web Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

IFeatureCollection Features { get; }

Property Value

IFeatureCollection

Fields

Collection of fields in the current Web object Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

IFieldCollection Fields { get; }

Property Value

IFieldCollection

Folders

Collection of folders in the current Web object Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

IFolderCollection Folders { get; }

Property Value

IFolderCollection

FooterEmphasis

Gets or sets the value of the footer emphasis.

FooterVariantThemeType FooterEmphasis { get; set; }

Property Value

FooterVariantThemeType

FooterEnabled

Gets or sets a value that specifies whether the footer is enabled on the site.

bool FooterEnabled { get; set; }

Property Value

bool

FooterLayout

Gets or sets the value of the footer layout.

FooterLayoutType FooterLayout { get; set; }

Property Value

FooterLayoutType

HeaderEmphasis

Gets or sets the value of the header emphasis.

VariantThemeType HeaderEmphasis { get; set; }

Property Value

VariantThemeType

HeaderLayout

Gets or sets the value of the header layout.

HeaderLayoutType HeaderLayout { get; set; }

Property Value

HeaderLayoutType

HideTitleInHeader

Gets or sets a value that specifies whether the title in header is hidden on the site.

bool HideTitleInHeader { get; set; }

Property Value

bool

HorizontalQuickLaunch

Defines whether to enable the Horizontal QuickLaunch for the current web

bool HorizontalQuickLaunch { get; set; }

Property Value

bool

Id

The Unique ID of the Web object

Guid Id { get; }

Property Value

Guid

IsHomepageModernized

Gets a value that indicates whether the homepage is modernized.

bool IsHomepageModernized { get; }

Property Value

bool

IsMultilingual

Defines whether to enable Multilingual capabilities for the current web

bool IsMultilingual { get; set; }

Property Value

bool

IsProvisioningComplete

Gets a value that indicates whether the provisioning is complete.

bool IsProvisioningComplete { get; }

Property Value

bool

IsRevertHomepageLinkHidden

Gets or sets a value that specifies whether the link to revert homepage is hidden.

bool IsRevertHomepageLinkHidden { get; set; }

Property Value

bool

Language

Gets a value that specifies the LCID for the language that is used on the site.

int Language { get; }

Property Value

int

LastItemModifiedDate

Gets a value that specifies when an item was last modified in the site.

DateTime LastItemModifiedDate { get; }

Property Value

DateTime

LastItemUserModifiedDate

Gets a value that specifies when an item was last modified by user in the site.

DateTime LastItemUserModifiedDate { get; }

Property Value

DateTime

Lists

Collection of lists in the current Web object. Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

IListCollection Lists { get; }

Property Value

IListCollection

LogoAlignment

Gets or sets the logo alignment of the site.

LogoAlignment LogoAlignment { get; set; }

Property Value

LogoAlignment

MasterUrl

Gets or sets the URL of the master page that is used for the website.

string MasterUrl { get; set; }

Property Value

string

MegaMenuEnabled

Gets or sets a value that specifies whether the megamenu is enabled on the site.

bool MegaMenuEnabled { get; set; }

Property Value

bool

MembersCanShare

Defines whether members can share content from the current web

bool MembersCanShare { get; set; }

Property Value

bool

NavAudienceTargetingEnabled

Gets or sets a value that specifies whether the audience targeting is enabled on the navigation of the site.

bool NavAudienceTargetingEnabled { get; set; }

Property Value

bool

Navigation

Navigation on the Web

INavigation Navigation { get; }

Property Value

INavigation

NextStepsFirstRunEnabled

Gets or sets a value that specifies if the Next steps pane should open automatically as a first run experience when someone visits the site. You can only enable the experience for sites created on or after January 1, 2020

bool NextStepsFirstRunEnabled { get; set; }

Property Value

bool

NoCrawl

Defines whether the site has to be crawled or not

bool NoCrawl { get; set; }

Property Value

bool

NotificationsInOneDriveForBusinessEnabled

Returns if true if the tenant allowed to send push notifications in OneDrive for Business.

bool NotificationsInOneDriveForBusinessEnabled { get; }

Property Value

bool

NotificationsInSharePointEnabled

Returns if true if the tenant allowed to send push notifications in SharePoint.

bool NotificationsInSharePointEnabled { get; }

Property Value

bool

ObjectCacheEnabled

Gets or sets a value that specifies whether the object cache is enabled on the site.

bool ObjectCacheEnabled { get; set; }

Property Value

bool

OverwriteTranslationsOnChange

Defines whether to OverwriteTranslationsOnChange on change for the current web

bool OverwriteTranslationsOnChange { get; set; }

Property Value

bool

PreviewFeaturesEnabled

Indicates whether the tenant administrator has chosen to disable the Preview Features. Default is true.

bool PreviewFeaturesEnabled { get; }

Property Value

bool

PrimaryColor

Gets or sets the primary color of the site.

string PrimaryColor { get; }

Property Value

string

QuickLaunchEnabled

Enables or disables the QuickLaunch for the site

bool QuickLaunchEnabled { get; set; }

Property Value

bool

RecycleBin

Gets the recycle bin of the website. Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

IRecycleBinItemCollection RecycleBin { get; }

Property Value

IRecycleBinItemCollection

RecycleBinEnabled

Gets or sets a value that specifies whether the Recycle Bin is enabled.

bool RecycleBinEnabled { get; set; }

Property Value

bool

RegionalSettings

Regional settings configured for this web

IRegionalSettings RegionalSettings { get; }

Property Value

IRegionalSettings

RequestAccessEmail

The email address to which any access request will be sent

string RequestAccessEmail { get; set; }

Property Value

string

RoleDefinitions

Role Definitions defined in this web Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

IRoleDefinitionCollection RoleDefinitions { get; }

Property Value

IRoleDefinitionCollection

RootFolder

Gets the root folder for the website.

IFolder RootFolder { get; }

Property Value

IFolder

SaveSiteAsTemplateEnabled

Gets or sets a Boolean value that specifies whether the Web site can be saved as a site template.

bool SaveSiteAsTemplateEnabled { get; set; }

Property Value

bool

SearchBoxInNavBar

Define if the suitebar search box should show or not

SearchBoxInNavBar SearchBoxInNavBar { get; set; }

Property Value

SearchBoxInNavBar

SearchBoxPlaceholderText

Search placeholder text for search box in navbar - overrides default placeholder text if set, returns null if not set.

string SearchBoxPlaceholderText { get; set; }

Property Value

string

SearchScope

Defines the SearchScope for the site

SearchScope SearchScope { get; set; }

Property Value

SearchScope

ServerRelativeUrl

Gets the server relative URL of the current site.

string ServerRelativeUrl { get; }

Property Value

string

SiteGroups

Gets the collection of all groups that belong to the site collection. Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

ISharePointGroupCollection SiteGroups { get; }

Property Value

ISharePointGroupCollection

SiteLogoDescription

Gets or sets the description of the Web site logo.

string SiteLogoDescription { get; set; }

Property Value

string

SiteLogoUrl

Gets or sets the server-relative URL of the Web site logo. This can also contain an absolute URL to the logo.

string SiteLogoUrl { get; set; }

Property Value

string

SiteUserInfoList

Gets the UserInfo list of the site collection that contains the website.

IList SiteUserInfoList { get; }

Property Value

IList

SiteUsers

Gets the collection of all users that belong to the site collection. Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

ISharePointUserCollection SiteUsers { get; }

Property Value

ISharePointUserCollection

SupportedUILanguageIds

List of languages (expressed via their id) that this site supports

List<int> SupportedUILanguageIds { get; }

Property Value

List<int>

SyndicationEnabled

Gets or sets a value that specifies whether the RSS feeds are enabled on the site.

bool SyndicationEnabled { get; set; }

Property Value

bool

TenantAdminMembersCanShare

Gets or sets a value that specifies how the tenant admin members can share.

SharingState TenantAdminMembersCanShare { get; }

Property Value

SharingState

ThemeData

Get JSON serialized ThemeData for the current web.

string ThemeData { get; }

Property Value

string

ThirdPartyMdmEnabled

Gets a value that indicates whether third party MDM (Mobile Device Management) is enabled on the site.

bool ThirdPartyMdmEnabled { get; }

Property Value

bool

Title

The Title of the Site, optional attribute.

string Title { get; set; }

Property Value

string

TreeViewEnabled

Gets or sets value that specifies whether the tree view is enabled on the site.

bool TreeViewEnabled { get; set; }

Property Value

bool

Url

The URL of the Web object

Uri Url { get; }

Property Value

Uri

UseAccessRequestDefault

Determines if we need to use the default access request If this value is True we send access requests to owner/owner's group If this value is False we send access requests to the configured AccessRequestEmail

bool UseAccessRequestDefault { get; }

Property Value

bool

UserCustomActions

Gets a value that specifies the collection of user custom actions for the site. Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

IUserCustomActionCollection UserCustomActions { get; }

Property Value

IUserCustomActionCollection

WebTemplate

Gets the name of the site definition or site template that was used to create the site.

string WebTemplate { get; }

Property Value

string

WebTemplateConfiguration

Gets the web template configuration of the site.

string WebTemplateConfiguration { get; }

Property Value

string

WebTemplatesGalleryFirstRunEnabled

Gets or sets a value that specifies if the web templates experience should open automatically as a first run experience after the site was created

bool WebTemplatesGalleryFirstRunEnabled { get; set; }

Property Value

bool

Webs

Collection of webs in this current web Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

IWebCollection Webs { get; }

Property Value

IWebCollection

WelcomePage

Specifies a string that contains the site-relative URL to which users are redirected when web is browsed (typically the site's home page).

string WelcomePage { get; }

Property Value

string

Methods

AddIndexedProperty(string)

Adds a web property as an indexed property

bool AddIndexedProperty(string propertyName)

Parameters

propertyName string

The property name

Returns

bool

True if it was successfully added or if it is already exists otherwise false

Remarks

The property must already exist as metadata of the Web

AddIndexedPropertyAsync(string)

Adds a web property as an indexed property

Task<bool> AddIndexedPropertyAsync(string propertyName)

Parameters

propertyName string

The property name

Returns

Task<bool>

True if it was successfully added or if it is already exists otherwise false

Remarks

The property must already exist as metadata of the Web

AsSyntexContentCenter()

Returns the current web as ISyntexContentCenter if the web is a Syntex Content Center, null is returned otherwise

ISyntexContentCenter AsSyntexContentCenter()

Returns

ISyntexContentCenter

The current web as ISyntexContentCenter

AsSyntexContentCenterAsync()

Returns the current web as ISyntexContentCenter if the web is a Syntex Content Center, null is returned otherwise

Task<ISyntexContentCenter> AsSyntexContentCenterAsync()

Returns

Task<ISyntexContentCenter>

The current web as ISyntexContentCenter

CheckIfUserHasPermissions(string, PermissionKind)

Checks if a user has a specific kind of permissions to a web

bool CheckIfUserHasPermissions(string userPrincipalName, PermissionKind permissionKind)

Parameters

userPrincipalName string

Login name of the user you wish to check if he has a specific permission

permissionKind PermissionKind

Permission kind to check

Returns

bool

Boolean that says if the user has permissions or not

CheckIfUserHasPermissionsAsync(string, PermissionKind)

Checks if a user has a specific kind of permissions to a web

Task<bool> CheckIfUserHasPermissionsAsync(string userPrincipalName, PermissionKind permissionKind)

Parameters

userPrincipalName string

Login name of the user you wish to check if he has a specific permission

permissionKind PermissionKind

Permission kind to check

Returns

Task<bool>

Boolean that says if the user has permissions or not

EnsureEveryoneExceptExternalUsers()

Retrieves everyone except external users and ensures the user in the current web

ISharePointUser EnsureEveryoneExceptExternalUsers()

Returns

ISharePointUser

The ensured ISharePointUser

EnsureEveryoneExceptExternalUsersAsync()

Retrieves everyone except external users and ensures the user in the current web

Task<ISharePointUser> EnsureEveryoneExceptExternalUsersAsync()

Returns

Task<ISharePointUser>

The ensured ISharePointUser

EnsureMultilingual(List<int>)

Ensure a site can support multilingual (pages) for the passed along languages

void EnsureMultilingual(List<int> requiredLanguageIds)

Parameters

requiredLanguageIds List<int>

List of langauges to support for multilingual on this site. See https://capacreative.co.uk/resources/reference-sharepoint-online-languages-ids/ for information on the language ids

EnsureMultilingualAsync(List<int>)

Ensure a site can support multilingual (pages) for the passed along languages

Task EnsureMultilingualAsync(List<int> requiredLanguageIds)

Parameters

requiredLanguageIds List<int>

List of langauges to support for multilingual on this site. See https://capacreative.co.uk/resources/reference-sharepoint-online-languages-ids/ for information on the language ids

Returns

Task

EnsurePageScheduling()

Ensures that page publishing can work for this site. Page scheduling only works for the root web of a site collection

void EnsurePageScheduling()

EnsurePageSchedulingAsync()

Ensures that page publishing can work for this site. Page scheduling only works for the root web of a site collection

Task EnsurePageSchedulingAsync()

Returns

Task

EnsureUser(string)

Ensures the given users exists

ISharePointUser EnsureUser(string userPrincipalName)

Parameters

userPrincipalName string

UserPrincipalName value of the user to verify

Returns

ISharePointUser

The ensured ISharePointUser

EnsureUserAsync(string)

Ensures the given users exists

Task<ISharePointUser> EnsureUserAsync(string userPrincipalName)

Parameters

userPrincipalName string

UserPrincipalName value of the user to verify

Returns

Task<ISharePointUser>

The ensured ISharePointUser

EnsureUserBatch(Batch, string)

Ensures the given users exists

ISharePointUser EnsureUserBatch(Batch batch, string userPrincipalName)

Parameters

batch Batch

Batch to add this request to

userPrincipalName string

UserPrincipalName value of the user to verify

Returns

ISharePointUser

The ensured ISharePointUser

EnsureUserBatch(string)

Ensures the given users exists

ISharePointUser EnsureUserBatch(string userPrincipalName)

Parameters

userPrincipalName string

UserPrincipalName value of the user to verify

Returns

ISharePointUser

The ensured ISharePointUser

EnsureUserBatchAsync(Batch, string)

Ensures the given users exists

Task<ISharePointUser> EnsureUserBatchAsync(Batch batch, string userPrincipalName)

Parameters

batch Batch

Batch to add this request to

userPrincipalName string

UserPrincipalName value of the user to verify

Returns

Task<ISharePointUser>

The ensured ISharePointUser

EnsureUserBatchAsync(string)

Ensures the given users exists

Task<ISharePointUser> EnsureUserBatchAsync(string userPrincipalName)

Parameters

userPrincipalName string

UserPrincipalName value of the user to verify

Returns

Task<ISharePointUser>

The ensured ISharePointUser

GetBrandingManager()

Returns the branding manager which can be used to change the look of the web

IBrandingManager GetBrandingManager()

Returns

IBrandingManager

An IBrandingManager instance

GetCurrentUser()

Get's the current logged on user making the request to SharePoint

ISharePointUser GetCurrentUser()

Returns

ISharePointUser

The current ISharePointUser

GetCurrentUserAsync()

Get's the current logged on user making the request to SharePoint

Task<ISharePointUser> GetCurrentUserAsync()

Returns

Task<ISharePointUser>

The current ISharePointUser

GetCurrentUserBatch()

Get's the current logged on user making the request to SharePoint

ISharePointUser GetCurrentUserBatch()

Returns

ISharePointUser

The current ISharePointUser

GetCurrentUserBatch(Batch)

Get's the current logged on user making the request to SharePoint

ISharePointUser GetCurrentUserBatch(Batch batch)

Parameters

batch Batch

Batch to add this request to

Returns

ISharePointUser

The current ISharePointUser

GetCurrentUserBatchAsync()

Get's the current logged on user making the request to SharePoint

Task<ISharePointUser> GetCurrentUserBatchAsync()

Returns

Task<ISharePointUser>

The current ISharePointUser

GetCurrentUserBatchAsync(Batch)

Get's the current logged on user making the request to SharePoint

Task<ISharePointUser> GetCurrentUserBatchAsync(Batch batch)

Parameters

batch Batch

Batch to add this request to

Returns

Task<ISharePointUser>

The current ISharePointUser

GetFileById(Guid, params Expression<Func<IFile, object>>[])

Get a file in the current web from its unique id.

IFile GetFileById(Guid uniqueFileId, params Expression<Func<IFile, object>>[] expressions)

Parameters

uniqueFileId Guid

The unique id of the file to get.

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

IFile

The file to get

GetFileByIdAsync(Guid, params Expression<Func<IFile, object>>[])

Get a file in the current web from its unique id.

Task<IFile> GetFileByIdAsync(Guid uniqueFileId, params Expression<Func<IFile, object>>[] expressions)

Parameters

uniqueFileId Guid

The unique id of the file to get.

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

Task<IFile>

The file to get

GetFileByIdBatch(Batch, Guid, params Expression<Func<IFile, object>>[])

Get a file in the current web from its unique id via batch.

IFile GetFileByIdBatch(Batch batch, Guid uniqueFileId, params Expression<Func<IFile, object>>[] expressions)

Parameters

batch Batch

Batch to add this request to

uniqueFileId Guid

The unique id of the file to get.

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

IFile

The file to get

GetFileByIdBatch(Guid, params Expression<Func<IFile, object>>[])

Get a file in the current web from its unique id via batch.

IFile GetFileByIdBatch(Guid uniqueFileId, params Expression<Func<IFile, object>>[] expressions)

Parameters

uniqueFileId Guid

The unique id of the file to get.

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

IFile

The file to get

GetFileByIdBatchAsync(Batch, Guid, params Expression<Func<IFile, object>>[])

Get a file in the current web from its unique id via batch.

Task<IFile> GetFileByIdBatchAsync(Batch batch, Guid uniqueFileId, params Expression<Func<IFile, object>>[] expressions)

Parameters

batch Batch

Batch to add this request to

uniqueFileId Guid

The unique id of the file to get.

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

Task<IFile>

The file to get

GetFileByIdBatchAsync(Guid, params Expression<Func<IFile, object>>[])

Get a file in the current web from its unique id via batch.

Task<IFile> GetFileByIdBatchAsync(Guid uniqueFileId, params Expression<Func<IFile, object>>[] expressions)

Parameters

uniqueFileId Guid

The unique id of the file to get.

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

Task<IFile>

The file to get

Get's a file from a given link (sharing link, path to file)

IFile GetFileByLink(string link, params Expression<Func<IFile, object>>[] expressions)

Parameters

link string

Link pointing to a file

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

IFile

IFile reference when the file could be found, exception otherwise

GetFileByLinkAsync(string, params Expression<Func<IFile, object>>[])

Get's a file from a given link (sharing link, path to file)

Task<IFile> GetFileByLinkAsync(string link, params Expression<Func<IFile, object>>[] expressions)

Parameters

link string

Link pointing to a file

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

Task<IFile>

IFile reference when the file could be found, exception otherwise

GetFileByServerRelativeUrl(string, params Expression<Func<IFile, object>>[])

Get a file in the current web from its server relative URL.

IFile GetFileByServerRelativeUrl(string serverRelativeUrl, params Expression<Func<IFile, object>>[] expressions)

Parameters

serverRelativeUrl string

The server relative URL of the file to get.

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

IFile

The file to get

GetFileByServerRelativeUrlAsync(string, params Expression<Func<IFile, object>>[])

Get a file in the current web from its server relative URL.

Task<IFile> GetFileByServerRelativeUrlAsync(string serverRelativeUrl, params Expression<Func<IFile, object>>[] expressions)

Parameters

serverRelativeUrl string

The server relative URL of the file to get.

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

Task<IFile>

The file to get

GetFileByServerRelativeUrlBatch(Batch, string, params Expression<Func<IFile, object>>[])

Get a file in the current web from its server relative URL via batch.

IFile GetFileByServerRelativeUrlBatch(Batch batch, string serverRelativeUrl, params Expression<Func<IFile, object>>[] expressions)

Parameters

batch Batch

Batch to add this request to

serverRelativeUrl string

The server relative URL of the file to get.

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

IFile

The file to get

GetFileByServerRelativeUrlBatch(string, params Expression<Func<IFile, object>>[])

Get a file in the current web from its server relative URL via batch.

IFile GetFileByServerRelativeUrlBatch(string serverRelativeUrl, params Expression<Func<IFile, object>>[] expressions)

Parameters

serverRelativeUrl string

The server relative URL of the file to get.

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

IFile

The file to get

GetFileByServerRelativeUrlBatchAsync(Batch, string, params Expression<Func<IFile, object>>[])

Get a file in the current web from its server relative URL via batch.

Task<IFile> GetFileByServerRelativeUrlBatchAsync(Batch batch, string serverRelativeUrl, params Expression<Func<IFile, object>>[] expressions)

Parameters

batch Batch

Batch to add this request to

serverRelativeUrl string

The server relative URL of the file to get.

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

Task<IFile>

The file to get

GetFileByServerRelativeUrlBatchAsync(string, params Expression<Func<IFile, object>>[])

Get a file in the current web from its server relative URL via batch.

Task<IFile> GetFileByServerRelativeUrlBatchAsync(string serverRelativeUrl, params Expression<Func<IFile, object>>[] expressions)

Parameters

serverRelativeUrl string

The server relative URL of the file to get.

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

Task<IFile>

The file to get

GetFileByServerRelativeUrlOrDefault(string, params Expression<Func<IFile, object>>[])

Get a file in the current web from its server relative URL, it not available null will be returned

IFile GetFileByServerRelativeUrlOrDefault(string serverRelativeUrl, params Expression<Func<IFile, object>>[] expressions)

Parameters

serverRelativeUrl string

The server relative URL of the file to get.

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

IFile

The file to get or null if the file was not available

GetFileByServerRelativeUrlOrDefaultAsync(string, params Expression<Func<IFile, object>>[])

Get a file in the current web from its server relative URL, it not available null will be returned

Task<IFile> GetFileByServerRelativeUrlOrDefaultAsync(string serverRelativeUrl, params Expression<Func<IFile, object>>[] expressions)

Parameters

serverRelativeUrl string

The server relative URL of the file to get.

expressions Expression<Func<IFile, object>>[]

Properties to load for the requested IFile

Returns

Task<IFile>

The file to get or null if the file was not available

GetFolderById(Guid, params Expression<Func<IFolder, object>>[])

Get a folder in the current web from its id.

IFolder GetFolderById(Guid folderId, params Expression<Func<IFolder, object>>[] expressions)

Parameters

folderId Guid

The id of the folder to get.

expressions Expression<Func<IFolder, object>>[]

Expressions needed to create the request

Returns

IFolder

The folder to get

GetFolderByIdAsync(Guid, params Expression<Func<IFolder, object>>[])

Get a folder in the current web from its id.

Task<IFolder> GetFolderByIdAsync(Guid folderId, params Expression<Func<IFolder, object>>[] expressions)

Parameters

folderId Guid

The id of the folder to get.

expressions Expression<Func<IFolder, object>>[]

Expressions needed to create the request

Returns

Task<IFolder>

The folder to get

GetFolderByIdBatch(Batch, Guid, params Expression<Func<IFolder, object>>[])

Get a folder in the current web from its id via batch.

IFolder GetFolderByIdBatch(Batch batch, Guid folderId, params Expression<Func<IFolder, object>>[] expressions)

Parameters

batch Batch

Batch to add this request to

folderId Guid

The id of the folder to get.

expressions Expression<Func<IFolder, object>>[]

Expressions needed to create the request

Returns

IFolder

The folder to get

GetFolderByIdBatch(Guid, params Expression<Func<IFolder, object>>[])

Get a folder in the current web from its id via batch.

IFolder GetFolderByIdBatch(Guid folderId, params Expression<Func<IFolder, object>>[] expressions)

Parameters

folderId Guid

The id of the folder to get.

expressions Expression<Func<IFolder, object>>[]

Expressions needed to create the request

Returns

IFolder

The folder to get

GetFolderByIdBatchAsync(Batch, Guid, params Expression<Func<IFolder, object>>[])

Get a folder in the current web from its id via batch.

Task<IFolder> GetFolderByIdBatchAsync(Batch batch, Guid folderId, params Expression<Func<IFolder, object>>[] expressions)

Parameters

batch Batch

Batch to add this request to

folderId Guid

The id of the folder to get.

expressions Expression<Func<IFolder, object>>[]

Expressions needed to create the request

Returns

Task<IFolder>

The folder to get

GetFolderByIdBatchAsync(Guid, params Expression<Func<IFolder, object>>[])

Get a folder in the current web from its id via batch.

Task<IFolder> GetFolderByIdBatchAsync(Guid folderId, params Expression<Func<IFolder, object>>[] expressions)

Parameters

folderId Guid

The id of the folder to get.

expressions Expression<Func<IFolder, object>>[]

Expressions needed to create the request

Returns

Task<IFolder>

The folder to get

GetFolderByServerRelativeUrl(string, params Expression<Func<IFolder, object>>[])

Get a folder in the current web from its server relative URL.

IFolder GetFolderByServerRelativeUrl(string serverRelativeUrl, params Expression<Func<IFolder, object>>[] expressions)

Parameters

serverRelativeUrl string

The server relative URL of the folder to get.

expressions Expression<Func<IFolder, object>>[]

Expressions needed to create the request

Returns

IFolder

The folder to get

GetFolderByServerRelativeUrlAsync(string, params Expression<Func<IFolder, object>>[])

Get a folder in the current web from its server relative URL.

Task<IFolder> GetFolderByServerRelativeUrlAsync(string serverRelativeUrl, params Expression<Func<IFolder, object>>[] expressions)

Parameters

serverRelativeUrl string

The server relative URL of the folder to get.

expressions Expression<Func<IFolder, object>>[]

Expressions needed to create the request

Returns

Task<IFolder>

The folder to get

GetFolderByServerRelativeUrlBatch(Batch, string, params Expression<Func<IFolder, object>>[])

Get a folder in the current web from its server relative URL via batch.

IFolder GetFolderByServerRelativeUrlBatch(Batch batch, string serverRelativeUrl, params Expression<Func<IFolder, object>>[] expressions)

Parameters

batch Batch

Batch to add this request to

serverRelativeUrl string

The server relative URL of the folder to get.

expressions Expression<Func<IFolder, object>>[]

Expressions needed to create the request

Returns

IFolder

The folder to get

GetFolderByServerRelativeUrlBatch(string, params Expression<Func<IFolder, object>>[])

Get a folder in the current web from its server relative URL via batch.

IFolder GetFolderByServerRelativeUrlBatch(string serverRelativeUrl, params Expression<Func<IFolder, object>>[] expressions)

Parameters

serverRelativeUrl string

The server relative URL of the folder to get.

expressions Expression<Func<IFolder, object>>[]

Expressions needed to create the request

Returns

IFolder

The folder to get

GetFolderByServerRelativeUrlBatchAsync(Batch, string, params Expression<Func<IFolder, object>>[])

Get a folder in the current web from its server relative URL via batch.

Task<IFolder> GetFolderByServerRelativeUrlBatchAsync(Batch batch, string serverRelativeUrl, params Expression<Func<IFolder, object>>[] expressions)

Parameters

batch Batch

Batch to add this request to

serverRelativeUrl string

The server relative URL of the folder to get.

expressions Expression<Func<IFolder, object>>[]

Expressions needed to create the request

Returns

Task<IFolder>

The folder to get

GetFolderByServerRelativeUrlBatchAsync(string, params Expression<Func<IFolder, object>>[])

Get a folder in the current web from its server relative URL via batch.

Task<IFolder> GetFolderByServerRelativeUrlBatchAsync(string serverRelativeUrl, params Expression<Func<IFolder, object>>[] expressions)

Parameters

serverRelativeUrl string

The server relative URL of the folder to get.

expressions Expression<Func<IFolder, object>>[]

Expressions needed to create the request

Returns

Task<IFolder>

The folder to get

GetPages(string)

Gets the modern pages of this site, optionally scoped down via a filter

List<IPage> GetPages(string pageName = null)

Parameters

pageName string

Page name to filter on, uses a "starts with" filter

Returns

List<IPage>

One of more modern pages

GetPagesAsync(string)

Gets the modern pages of this site, optionally scoped down via a filter

Task<List<IPage>> GetPagesAsync(string pageName = null)

Parameters

pageName string

Page name to filter on, uses a "starts with" filter

Returns

Task<List<IPage>>

One of more modern pages

GetRecycleBinItemsByQuery(RecycleBinQueryOptions)

Searches the recyclebin returning items based upon the passed search criteria

IRecycleBinItemCollection GetRecycleBinItemsByQuery(RecycleBinQueryOptions options)

Parameters

options RecycleBinQueryOptions

Recycle bin search criteria

Returns

IRecycleBinItemCollection

A list containing zero or more recycle bin items

GetRecycleBinItemsByQueryAsync(RecycleBinQueryOptions)

Searches the recyclebin returning items based upon the passed search criteria

Task<IRecycleBinItemCollection> GetRecycleBinItemsByQueryAsync(RecycleBinQueryOptions options)

Parameters

options RecycleBinQueryOptions

Recycle bin search criteria

Returns

Task<IRecycleBinItemCollection>

A list containing zero or more recycle bin items

GetRecycleBinItemsByQueryBatch(RecycleBinQueryOptions)

Searches the recyclebin returning items based upon the passed search criteria

IRecycleBinItemCollection GetRecycleBinItemsByQueryBatch(RecycleBinQueryOptions options)

Parameters

options RecycleBinQueryOptions

Recycle bin search criteria

Returns

IRecycleBinItemCollection

A list containing zero or more recycle bin items

GetRecycleBinItemsByQueryBatch(Batch, RecycleBinQueryOptions)

Searches the recyclebin returning items based upon the passed search criteria

IRecycleBinItemCollection GetRecycleBinItemsByQueryBatch(Batch batch, RecycleBinQueryOptions options)

Parameters

batch Batch

Batch to add this request to

options RecycleBinQueryOptions

Recycle bin search criteria

Returns

IRecycleBinItemCollection

A list containing zero or more recycle bin items

GetRecycleBinItemsByQueryBatchAsync(RecycleBinQueryOptions)

Searches the recyclebin returning items based upon the passed search criteria

Task<IRecycleBinItemCollection> GetRecycleBinItemsByQueryBatchAsync(RecycleBinQueryOptions options)

Parameters

options RecycleBinQueryOptions

Recycle bin search criteria

Returns

Task<IRecycleBinItemCollection>

A list containing zero or more recycle bin items

GetRecycleBinItemsByQueryBatchAsync(Batch, RecycleBinQueryOptions)

Searches the recyclebin returning items based upon the passed search criteria

Task<IRecycleBinItemCollection> GetRecycleBinItemsByQueryBatchAsync(Batch batch, RecycleBinQueryOptions options)

Parameters

batch Batch

Batch to add this request to

options RecycleBinQueryOptions

Recycle bin search criteria

Returns

Task<IRecycleBinItemCollection>

A list containing zero or more recycle bin items

GetSearchConfigurationManagedProperties()

Gets the managed properties from the search configuration of this web

List<IManagedProperty> GetSearchConfigurationManagedProperties()

Returns

List<IManagedProperty>

List of managed properties

GetSearchConfigurationManagedPropertiesAsync()

Gets the managed properties from the search configuration of this web

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

Task<string>

Search configuration XML

GetUserById(int)

Get's a user by it's id in this site. The user needs to exist, use EnsureUser(string) if you want to create the user if it does not yet exist

ISharePointUser GetUserById(int userId)

Parameters

userId int

Id of the user to get

Returns

ISharePointUser

The found user as ISharePointPrincipal

GetUserByIdAsync(int)

Get's a user by it's id in this site. The user needs to exist, use EnsureUserAsync(string) if you want to create the user if it does not yet exist

Task<ISharePointUser> GetUserByIdAsync(int userId)

Parameters

userId int

Id of the user to get

Returns

Task<ISharePointUser>

The found user as ISharePointPrincipal

GetUserByIdBatch(Batch, int)

Get's a user by it's id in this site. The user needs to exist, use EnsureUserBatch(string) if you want to create the user if it does not yet exist

ISharePointUser GetUserByIdBatch(Batch batch, int userId)

Parameters

batch Batch

Batch to add this request to

userId int

Id of the user to get

Returns

ISharePointUser

The found user as ISharePointPrincipal

GetUserByIdBatch(int)

Get's a user by it's id in this site. The user needs to exist, use EnsureUserBatch(string) if you want to create the user if it does not yet exist

ISharePointUser GetUserByIdBatch(int userId)

Parameters

userId int

Id of the user to get

Returns

ISharePointUser

The found user as ISharePointPrincipal

GetUserByIdBatchAsync(Batch, int)

Get's a user by it's id in this site. The user needs to exist, use EnsureUserBatchAsync(string) if you want to create the user if it does not yet exist

Task<ISharePointUser> GetUserByIdBatchAsync(Batch batch, int userId)

Parameters

batch Batch

Batch to add this request to

userId int

Id of the user to get

Returns

Task<ISharePointUser>

The found user as ISharePointPrincipal

GetUserByIdBatchAsync(int)

Get's a user by it's id in this site. The user needs to exist, use EnsureUserBatchAsync(string) if you want to create the user if it does not yet exist

Task<ISharePointUser> GetUserByIdBatchAsync(int userId)

Parameters

userId int

Id of the user to get

Returns

Task<ISharePointUser>

The found user as ISharePointPrincipal

GetUserEffectivePermissions(string)

Gets the user effective permissions of a user for a web

IBasePermissions GetUserEffectivePermissions(string userPrincipalName)

Parameters

userPrincipalName string

Login name of the user you wish to retrieve the permissions of

Returns

IBasePermissions

Base permissions object that contains the High and the Low permissions

GetUserEffectivePermissionsAsync(string)

Gets the user effective permissions of a user for a web

Task<IBasePermissions> GetUserEffectivePermissionsAsync(string userPrincipalName)

Parameters

userPrincipalName string

Login name of the user you wish to retrieve the permissions of

Returns

Task<IBasePermissions>

Base permissions object that contains the High and the Low permissions

GetVivaDashboard()

Gets Viva Connections dashboard. If there is no dashboard configured, returns null

IVivaDashboard GetVivaDashboard()

Returns

IVivaDashboard

Viva Dashboard or null

GetVivaDashboardAsync()

Gets Viva Connections dashboard. If there is no dashboard configured, returns null

Task<IVivaDashboard> GetVivaDashboardAsync()

Returns

Task<IVivaDashboard>

Viva Dashboard or null

GetWebTemplateByName(string, int, bool)

Return a specific web template based by a name

IWebTemplate GetWebTemplateByName(string name, int lcid = 1033, bool includeCrossLanguage = false)

Parameters

name string

Name of the template to retrieve

lcid int

Specifies the LCID of the site templates to be retrieved.

includeCrossLanguage bool

Specifies whether to include language-neutral site templates.

Returns

IWebTemplate

The template with the specified name, if available

GetWebTemplateByNameAsync(string, int, bool)

Return a specific web template based by a name

Task<IWebTemplate> GetWebTemplateByNameAsync(string name, int lcid = 1033, bool includeCrossLanguage = false)

Parameters

name string

Name of the template to retrieve

lcid int

Specifies the LCID of the site templates to be retrieved.

includeCrossLanguage bool

Specifies whether to include language-neutral site templates.

Returns

Task<IWebTemplate>

The template with the specified name, if available

GetWebTemplateByNameBatch(Batch, string, int, bool)

Return a specific web template based by a name

IBatchSingleResult<IWebTemplate> GetWebTemplateByNameBatch(Batch batch, string name, int lcid = 1033, bool includeCrossLanguage = false)

Parameters

batch Batch

Batch to add this request to

name string

Name of the template to retrieve

lcid int

Specifies the LCID of the site templates to be retrieved.

includeCrossLanguage bool

Specifies whether to include language-neutral site templates.

Returns

IBatchSingleResult<IWebTemplate>

The template with the specified name, if available

GetWebTemplateByNameBatch(string, int, bool)

Return a specific web template based by a name

IBatchSingleResult<IWebTemplate> GetWebTemplateByNameBatch(string name, int lcid = 1033, bool includeCrossLanguage = false)

Parameters

name string

Name of the template to retrieve

lcid int

Specifies the LCID of the site templates to be retrieved.

includeCrossLanguage bool

Specifies whether to include language-neutral site templates.

Returns

IBatchSingleResult<IWebTemplate>

The template with the specified name, if available

GetWebTemplateByNameBatchAsync(Batch, string, int, bool)

Return a specific web template based by a name

Task<IBatchSingleResult<IWebTemplate>> GetWebTemplateByNameBatchAsync(Batch batch, string name, int lcid = 1033, bool includeCrossLanguage = false)

Parameters

batch Batch

Batch to add this request to

name string

Name of the template to retrieve

lcid int

Specifies the LCID of the site templates to be retrieved.

includeCrossLanguage bool

Specifies whether to include language-neutral site templates.

Returns

Task<IBatchSingleResult<IWebTemplate>>

The template with the specified name, if available

GetWebTemplateByNameBatchAsync(string, int, bool)

Return a specific web template based by a name

Task<IBatchSingleResult<IWebTemplate>> GetWebTemplateByNameBatchAsync(string name, int lcid = 1033, bool includeCrossLanguage = false)

Parameters

name string

Name of the template to retrieve

lcid int

Specifies the LCID of the site templates to be retrieved.

includeCrossLanguage bool

Specifies whether to include language-neutral site templates.

Returns

Task<IBatchSingleResult<IWebTemplate>>

The list of webtemplates available on the current web

GetWebTemplates(int, bool)

Returns a collection of site templates available for the site.

List<IWebTemplate> GetWebTemplates(int lcid = 1033, bool includeCrossLanguage = false)

Parameters

lcid int

Specifies the LCID of the site templates to be retrieved.

includeCrossLanguage bool

Specifies whether to include language-neutral site templates.

Returns

List<IWebTemplate>

The list of webtemplates available on the current web

GetWebTemplatesAsync(int, bool)

Returns a collection of site templates available for the site.

Task<List<IWebTemplate>> GetWebTemplatesAsync(int lcid = 1033, bool includeCrossLanguage = false)

Parameters

lcid int

Specifies the LCID of the site templates to be retrieved.

includeCrossLanguage bool

Specifies whether to include language-neutral site templates.

Returns

Task<List<IWebTemplate>>

The list of webtemplates available on the current web

GetWebTemplatesBatch(Batch, int, bool)

Returns a collection of site templates available for the site.

IEnumerableBatchResult<IWebTemplate> GetWebTemplatesBatch(Batch batch, int lcid = 1033, bool includeCrossLanguage = false)

Parameters

batch Batch

Batch to add this request to

lcid int

Specifies the LCID of the site templates to be retrieved.

includeCrossLanguage bool

Specifies whether to include language-neutral site templates.

Returns

IEnumerableBatchResult<IWebTemplate>

The list of webtemplates available on the current web

GetWebTemplatesBatch(int, bool)

Returns a collection of site templates available for the site.

IEnumerableBatchResult<IWebTemplate> GetWebTemplatesBatch(int lcid = 1033, bool includeCrossLanguage = false)

Parameters

lcid int

Specifies the LCID of the site templates to be retrieved.

includeCrossLanguage bool

Specifies whether to include language-neutral site templates.

Returns

IEnumerableBatchResult<IWebTemplate>

The list of webtemplates available on the current web

GetWebTemplatesBatchAsync(Batch, int, bool)

Returns a collection of site templates available for the site.

Task<IEnumerableBatchResult<IWebTemplate>> GetWebTemplatesBatchAsync(Batch batch, int lcid = 1033, bool includeCrossLanguage = false)

Parameters

batch Batch

Batch to add this request to

lcid int

Specifies the LCID of the site templates to be retrieved.

includeCrossLanguage bool

Specifies whether to include language-neutral site templates.

Returns

Task<IEnumerableBatchResult<IWebTemplate>>

The list of webtemplates available on the current web

GetWebTemplatesBatchAsync(int, bool)

Returns a collection of site templates available for the site.

Task<IEnumerableBatchResult<IWebTemplate>> GetWebTemplatesBatchAsync(int lcid = 1033, bool includeCrossLanguage = false)

Parameters

lcid int

Specifies the LCID of the site templates to be retrieved.

includeCrossLanguage bool

Specifies whether to include language-neutral site templates.

Returns

Task<IEnumerableBatchResult<IWebTemplate>>

The list of webtemplates available on the current web

GetWssIdForTerm(string)

Returns the Id for a term if present in the TaxonomyHiddenList. Otherwise returns -1;

int GetWssIdForTerm(string termId)

Parameters

termId string

Id of the term to lookup

Returns

int

Id of the term in the taxonomy hidden list, otherwise -1

GetWssIdForTermAsync(string)

Returns the Id for a term if present in the TaxonomyHiddenList. Otherwise returns -1;

Task<int> GetWssIdForTermAsync(string termId)

Parameters

termId string

Id of the term to lookup

Returns

Task<int>

Id of the term in the taxonomy hidden list, otherwise -1

HasCommunicationSiteFeatures()

Does this web have the communication site features enabled?

bool HasCommunicationSiteFeatures()

Returns

bool

True if enabled, false otherwise

HasCommunicationSiteFeaturesAsync()

Does this web have the communication site features enabled?

Task<bool> HasCommunicationSiteFeaturesAsync()

Returns

Task<bool>

True if enabled, false otherwise

IsNoScriptSite()

Checks if this web is configured for NoScript

bool IsNoScriptSite()

Returns

bool

True if set to NoScript, false otherwise

IsNoScriptSiteAsync()

Checks if this web is configured for NoScript

Task<bool> IsNoScriptSiteAsync()

Returns

Task<bool>

True if set to NoScript, false otherwise

IsSubSite()

Checks if this web is a sub site

bool IsSubSite()

Returns

bool

True if the web is a sub site

IsSubSiteAsync()

Checks if this web is a sub site

Task<bool> IsSubSiteAsync()

Returns

Task<bool>

True if the web is a sub site

IsSyntexContentCenter()

Is this web a Syntex Content Center

bool IsSyntexContentCenter()

Returns

bool

True if this web is a Syntex Content Center, false otherwise

IsSyntexContentCenterAsync()

Is this web a Syntex Content Center

Task<bool> IsSyntexContentCenterAsync()

Returns

Task<bool>

True if this web is a Syntex Content Center, false otherwise

IsSyntexEnabled()

Is the tenant enabled for SharePoint Syntex

bool IsSyntexEnabled()

Returns

bool

True if SharePoint Syntex is enabled, false otherwise

IsSyntexEnabledAsync()

Is the tenant enabled for SharePoint Syntex

Task<bool> IsSyntexEnabledAsync()

Returns

Task<bool>

True if SharePoint Syntex is enabled, false otherwise

IsSyntexEnabledForCurrentUser()

Is SharePoint Syntex enabled for the current user

bool IsSyntexEnabledForCurrentUser()

Returns

bool

True if SharePoint Syntex is enabled for the current user, false otherwise

IsSyntexEnabledForCurrentUserAsync()

Is SharePoint Syntex enabled for the current user

Task<bool> IsSyntexEnabledForCurrentUserAsync()

Returns

Task<bool>

True if SharePoint Syntex is enabled for the current user, false otherwise

NewPage(PageLayoutType, EditorType)

Creates a new modern page

IPage NewPage(PageLayoutType pageLayoutType = PageLayoutType.Article, EditorType editorType = EditorType.CK5)

Parameters

pageLayoutType PageLayoutType

Optionally specify the page type, defaults to Article

editorType EditorType

Editor type to be used by the new page, CK4 is the legacy model, CK5 the current

Returns

IPage

Created modern page

NewPageAsync(PageLayoutType, EditorType)

Creates a new modern page

Task<IPage> NewPageAsync(PageLayoutType pageLayoutType = PageLayoutType.Article, EditorType editorType = EditorType.CK5)

Parameters

pageLayoutType PageLayoutType

Optionally specify the page type, defaults to Article

editorType EditorType

Editor type to be used by the new page, CK4 is the legacy model, CK5 the current

Returns

Task<IPage>

Created modern page

ReIndex()

Reindexes this web

void ReIndex()

ReIndexAsync()

Reindexes this web

Task ReIndexAsync()

Returns

Task

RemoveIndexedProperty(string)

Removes a web propetry from the indexed properties

bool RemoveIndexedProperty(string propertyName)

Parameters

propertyName string

The property name

Returns

bool

True if it was successfully removed otherwise false

RemoveIndexedPropertyAsync(string)

Removes a web propetry from the indexed properties

Task<bool> RemoveIndexedPropertyAsync(string propertyName)

Parameters

propertyName string

The property name

Returns

Task<bool>

True if it was successfully removed otherwise false

Search(SearchOptions)

Performs a search query

ISearchResult Search(SearchOptions query)

Parameters

query SearchOptions

Search query to run

Returns

ISearchResult

The results of the search query

SearchAsync(SearchOptions)

Performs a search query

Task<ISearchResult> SearchAsync(SearchOptions query)

Parameters

query SearchOptions

Search query to run

Returns

Task<ISearchResult>

The results of the search query

SearchBatch(SearchOptions)

Performs a search query

IBatchSingleResult<ISearchResult> SearchBatch(SearchOptions query)

Parameters

query SearchOptions

Search query to run

Returns

IBatchSingleResult<ISearchResult>

The results of the search query

SearchBatch(Batch, SearchOptions)

Performs a search query

IBatchSingleResult<ISearchResult> SearchBatch(Batch batch, SearchOptions query)

Parameters

batch Batch

Batch to add this request to

query SearchOptions

Search query to run

Returns

IBatchSingleResult<ISearchResult>

The results of the search query

SearchBatchAsync(SearchOptions)

Performs a search query

Task<IBatchSingleResult<ISearchResult>> SearchBatchAsync(SearchOptions query)

Parameters

query SearchOptions

Search query to run

Returns

Task<IBatchSingleResult<ISearchResult>>

The results of the search query

SearchBatchAsync(Batch, SearchOptions)

Performs a search query

Task<IBatchSingleResult<ISearchResult>> SearchBatchAsync(Batch batch, SearchOptions query)

Parameters

batch Batch

Batch to add this request to

query SearchOptions

Search query to run

Returns

Task<IBatchSingleResult<ISearchResult>>

The results of the search query

SetAccessRequest(AccessRequestOption, string)

Applies the access request settings

Task SetAccessRequest(AccessRequestOption operation, string email = null)

Parameters

operation AccessRequestOption

The operation to be performed

email string

Applies the email address for the 'SpecificMail' operation

Returns

Task

SetAccessRequestAsync(AccessRequestOption, string)

Applies the access request settings

Task SetAccessRequestAsync(AccessRequestOption operation, string email = null)

Parameters

operation AccessRequestOption

The operation to be performed

email string

Applies the email address for the 'SpecificMail' operation

Returns

Task

SetSearchConfigurationXml(string)

Sets the search configuration for the web

void SetSearchConfigurationXml(string configuration)

Parameters

configuration string

Search configuration, obtained via GetSearchConfigurationXml() to apply

SetSearchConfigurationXmlAsync(string)

Sets the search configuration for the web

Task SetSearchConfigurationXmlAsync(string configuration)

Parameters

configuration string

Search configuration, obtained via GetSearchConfigurationXml() to apply

Returns

Task

SyncHubSiteThemeAsync()

Sync the hub site theme from parent hub site

Task SyncHubSiteThemeAsync()

Returns

Task

Takes in a sharing or regular SharePoint link and tries to provide relavant information about the resource behind the passed in link

IUnfurledResource UnfurlLink(string link, UnfurlOptions unfurlOptions = null)

Parameters

link string

Link to resource to get information for

unfurlOptions UnfurlOptions

Options to control the unfurling data gathering

Returns

IUnfurledResource

Data about the unfurled resource

UnfurlLinkAsync(string, UnfurlOptions)

Takes in a sharing or regular SharePoint link and tries to provide relavant information about the resource behind the passed in link

Task<IUnfurledResource> UnfurlLinkAsync(string link, UnfurlOptions unfurlOptions = null)

Parameters

link string

Link to resource to get information for

unfurlOptions UnfurlOptions

Options to control the unfurling data gathering

Returns

Task<IUnfurledResource>

Data about the unfurled resource

ValidateAndEnsureUsers(IList<string>)

Checks if the provided list of user UPN's are valid users in Azure AD and returns the 'ensured' SharePoint user

IList<ISharePointUser> ValidateAndEnsureUsers(IList<string> userList)

Parameters

userList IList<string>

List of user UPN's to validate in Azure AD

Returns

IList<ISharePointUser>

The list of ISharePointUser that exist

ValidateAndEnsureUsersAsync(IList<string>)

Checks if the provided list of user UPN's are valid users in Azure AD and returns the 'ensured' SharePoint user

Task<IList<ISharePointUser>> ValidateAndEnsureUsersAsync(IList<string> userList)

Parameters

userList IList<string>

List of user UPN's to validate in Azure AD

Returns

Task<IList<ISharePointUser>>

The list of ISharePointUser that exist

ValidateUsers(IList<string>)

Checks if the provided list of user UPN's are valid users in Azure AD

IList<string> ValidateUsers(IList<string> userList)

Parameters

userList IList<string>

List of user UPN's to validate in Azure AD

Returns

IList<string>

A list of users that were not found in Azure AD

ValidateUsersAsync(IList<string>)

Checks if the provided list of user UPN's are valid users in Azure AD

Task<IList<string>> ValidateUsersAsync(IList<string> userList)

Parameters

userList IList<string>

List of user UPN's to validate in Azure AD

Returns

Task<IList<string>>

A list of users that were not found in Azure AD