Interface ISharePointAdmin
- Namespace
- PnP.Core.Admin.Model.SharePoint
- Assembly
- PnP.Core.Admin.dll
SharePoint Admin features
public interface ISharePointAdmin
Methods
ConnectToHubSite(Uri, Uri, VanityUrlOptions)
Connects a site collection to a hub site. This method can also connect the site collection when the hub site requires approval for connecting new sites.
void ConnectToHubSite(Uri siteCollectionUrlToConnect, Uri hubSiteCollectionUrl, VanityUrlOptions vanityUrlOptions = null)
Parameters
siteCollectionUrlToConnectUriUri of the site collection to connect to the hub
hubSiteCollectionUrlUriUri of the hub to connect the site collection to
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
ConnectToHubSiteAsync(Uri, Uri, VanityUrlOptions)
Connects a site collection to a hub site. This method can also connect the site collection when the hub site requires approval for connecting new sites.
Task ConnectToHubSiteAsync(Uri siteCollectionUrlToConnect, Uri hubSiteCollectionUrl, VanityUrlOptions vanityUrlOptions = null)
Parameters
siteCollectionUrlToConnectUriUri of the site collection to connect to the hub
hubSiteCollectionUrlUriUri of the hub to connect the site collection to
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
GetTenantAdminCenterContext(VanityUrlOptions)
Returns a PnPContext for the tenant's SharePoint admin center site
PnPContext GetTenantAdminCenterContext(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
- PnPContext
PnPContext for the tenant's SharePoint admin center
GetTenantAdminCenterContextAsync(VanityUrlOptions)
Returns a PnPContext for the tenant's SharePoint admin center site
Task<PnPContext> GetTenantAdminCenterContextAsync(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
- Task<PnPContext>
PnPContext for the tenant's SharePoint admin center
GetTenantAdminCenterUri(VanityUrlOptions)
Returns the SharePoint tenant admin center url (e.g. https://contoso-admin.sharepoint.com)
Uri GetTenantAdminCenterUri(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
- Uri
SharePoint tenant admin center url
GetTenantAdminCenterUriAsync(VanityUrlOptions)
Returns the SharePoint tenant admin center url (e.g. https://contoso-admin.sharepoint.com)
Task<Uri> GetTenantAdminCenterUriAsync(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
GetTenantAdmins(VanityUrlOptions)
Returns a list of ISharePointUsers who are SharePoint Online Tenant admin
List<ISharePointUser> GetTenantAdmins(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
- List<ISharePointUser>
List of SharePoint Online Tenant admins
GetTenantAdminsAsync(VanityUrlOptions)
Returns a list of ISharePointUsers who are SharePoint Online Tenant admin
Task<List<ISharePointUser>> GetTenantAdminsAsync(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
- Task<List<ISharePointUser>>
List of SharePoint Online Tenant admins
GetTenantMySiteHostUri(VanityUrlOptions)
Returns the SharePoint tenant my site host url (e.g. https://contoso-my.sharepoint.com)
Uri GetTenantMySiteHostUri(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
- Uri
SharePoint tenant my site host url
GetTenantMySiteHostUriAsync(VanityUrlOptions)
Returns the SharePoint tenant my site host url (e.g. https://contoso-my.sharepoint.com)
Task<Uri> GetTenantMySiteHostUriAsync(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
GetTenantPortalUri(VanityUrlOptions)
Returns the SharePoint tenant portal url (e.g. https://contoso.sharepoint.com)
Uri GetTenantPortalUri(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
- Uri
SharePoint tenant portal url
GetTenantPortalUriAsync(VanityUrlOptions)
Returns the SharePoint tenant portal url (e.g. https://contoso.sharepoint.com)
Task<Uri> GetTenantPortalUriAsync(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
GetTenantProperties(VanityUrlOptions)
Gets the properties of this tenant
ITenantProperties GetTenantProperties(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
- ITenantProperties
Properties of the tenant
GetTenantPropertiesAsync(VanityUrlOptions)
Gets the properties of this tenant
Task<ITenantProperties> GetTenantPropertiesAsync(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
- Task<ITenantProperties>
Properties of the tenant
GetTenantSearchConfigurationManagedProperties(VanityUrlOptions)
Gets the managed properties from the search configuration of the tenant
List<IManagedProperty> GetTenantSearchConfigurationManagedProperties(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
- List<IManagedProperty>
List of managed properties
GetTenantSearchConfigurationManagedPropertiesAsync(VanityUrlOptions)
Gets the managed properties from the search configuration of the tenant
Task<List<IManagedProperty>> GetTenantSearchConfigurationManagedPropertiesAsync(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
- Task<List<IManagedProperty>>
List of managed properties
GetTenantSearchConfigurationXml(VanityUrlOptions)
Gets the search configuration of the tenant
string GetTenantSearchConfigurationXml(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
- string
Search configuration XML
GetTenantSearchConfigurationXmlAsync(VanityUrlOptions)
Gets the search configuration of the tenant
Task<string> GetTenantSearchConfigurationXmlAsync(VanityUrlOptions vanityUrlOptions = null)
Parameters
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
Returns
IsCurrentUserTenantAdmin()
Checks if the current user is SharePoint Online tenant admin
bool IsCurrentUserTenantAdmin()
Returns
- bool
True if the user is a SharePoint Online tenant admin, false otherwise
IsCurrentUserTenantAdminAsync()
Checks if the current user is SharePoint Online tenant admin
Task<bool> IsCurrentUserTenantAdminAsync()
Returns
SetTenantSearchConfigurationXml(string, VanityUrlOptions)
Sets the search configuration for the tenant
void SetTenantSearchConfigurationXml(string configuration, VanityUrlOptions vanityUrlOptions = null)
Parameters
configurationstringSearch configuration, obtained via GetTenantSearchConfigurationXml(VanityUrlOptions) to apply
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant
SetTenantSearchConfigurationXmlAsync(string, VanityUrlOptions)
Sets the search configuration for the tenant
Task SetTenantSearchConfigurationXmlAsync(string configuration, VanityUrlOptions vanityUrlOptions = null)
Parameters
configurationstringSearch configuration, obtained via GetTenantSearchConfigurationXml(VanityUrlOptions) to apply
vanityUrlOptionsVanityUrlOptionsOptionally specify the custom vanity URI's used by this tenant