Senior Product Manager, Microsoft

Menu

Site Subscriptions in SharePoint 2010

New multi-tenancy features are an exciting concept in SharePoint 2010, particularly when considering the implications on hosting SharePoint for a variety of tenants, each requiring some method of partitioning, administration, and a method of reporting and control whether within the boundaries of an Enterprise or as a hosting provider. In this post we’ll look at one of the layers of multi-tenancy in SharePoint 2010.

Site Subscriptions

SharePoint 2010 provides support for a concept known as site subscriptions. Site subscriptions can be loosely described as a collection of sites that subscribe to a set of service partitions, settings, and individual features – site subscriptions are also known as tenants. In summary we can approach site subscriptions as a loose association of content. In the Object Model site subscriptions are represented through Microsoft.SharePoint.SPSiteSubscription.

The management of site subscriptions occurs through a new administration site template, Tenant Administration, that is used to manage many aspects of the site collections that subscribe from the subscription.

Creating a new site subscription object in SharePoint Server 2010 requires an administrator to:

Create a SPSiteSubscription object

Create and add a SPSite object to the SPSiteSubscription

Included below are both Windows PowerShell and Object Model examples that will enable the creation, assignment, identification, and deletion of site subscriptions in SharePoint 2010.

Upon completion of the steps above (or below) you will have a new Tenant Administration site collection that will appear similar to the illustration below (click to enlarge).

On the Tenant Administration site collection select Manage Site Collections under SharePoint Sites to manage the properties of existing site subscription member site collections or add new sites to the site subscription (requires Self-Service Site Creation to be enabled on the Web application).

Creating Site Subscriptions through the Object Model

// Get an existing Tenant Administration Siteusing (SPSite site = new SPSite("http://<server>/<path>/<site>")) { // Create a Site Subscription SPSiteSubscription subscription = SPSiteSubscription.CreateSubscription(); // Add the Tenant Administration Site to the Site Subscription subscription.Add(site); }

http://<server>/<path>/<site&gt; represents the full path to the Tenant Administration site collection. Restoring a site subscription and its member sites is the opposite of the above, I.e. Import-, etc.