Create Subscription Settings Service Application For Add-In Development In SharePoint 2016

Add-in development was introduced in SharePoint 2013 as a way of executing implementation logic in a separate domain. You can read about setting up the add-in environment, in detail from here. As a part of setting up the environment for creating add-ins, we have to set up the app domain where we can run the add-ins in an isolated container. Once the app domain is set up, we have to add the app domain to the App Management Section in the SharePoint Central administration page. The app URL can be assigned at Configure App URLs section in the Apps tab.



Select Configure App URLs



We might come across the below error if we have not set up the ‘Subscription Settings Service Application’.



As the prerequisite in creating SharePoint add-in (apps), we have to ensure that we have the below two service applications created and running in the central administration.

  • App Management Service Application
  • Subscription Settings Service Application

App Management Service Application can be created from the UI; however, we don’t have the option to create the Subscription Settings Service Application from the UI. We have to use PowerShell script to create it. Let’s see how we can create one.

  • Before we could create the application pool for the subscription settings service application, we need to create a managed account that can be assigned to the application pool. Once the managed account is created, get its instance.
    1. $account = Get-SPManagedAccount "SharePointHOL\Priyan_ManagedAcc"  
  • Then create a new application pool that will be used for Service Application creation.
    1. $appPool = New-SPServiceApplicationPool -Name 'Subscription App Pool' -Account $account  
  • Now let’s create the service application using the below command.
    1. $SubscriptionSvcApp = New-SPSubscriptionSettingsServiceApplication -ApplicationPool $appPool -Name 'Subscription Settings Service Application' -DatabaseName 'SubscriptionSettings_ServiceDB'  
  • Finally, create the service application proxy for the service application.
    1. $SubscriptionSvcproxy = New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $SubscriptionSvcApp  

PowerShell Script

  1. $account = Get-SPManagedAccount "SharePointHOL\Priyan_ManagedAcc"  
  2. $appPool = New-SPServiceApplicationPool -Name 'Subscription App Pool' -Account $account  
  3. $SubscriptionSvcApp = New-SPSubscriptionSettingsServiceApplication -ApplicationPool $appPool -Name 'Subscription Settings Service Application' -DatabaseName 'SubscriptionSettings_ServiceDB'  
  4. $SubscriptionSvcproxy = New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $SubscriptionSvcApp  
Once the script is run, it will create the Subscription Settings Service Application which can be verified by going to the Central Administration-> Manage Service Applications.



It will also create a data base for the newly created Service Application which can be seen from the SQL Server.



Now, if we head over to the ‘Configure App URL’ section, we won’t be seeing any Subscription Settings Service Application missing error.



Summary - Thus, we saw how to configure Subscription Settings Service application using PowerShell in SharePoint 2016. This is a pre-requisite in order to get started with Add-in (Previously App) development in SharePoint Server 2016. 

Up Next
    Ebook Download
    View all
    Learn
    View all