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