Provisioning SharePoint App Catalog in SP 2013/2016

Starting from SP 2013 we have to have application catalog in order to host SharePoint hosted apps which is part of SP App Model which replaces solutions you used to use in older versions of SharePoint.

This topic is documented both by MSFT and by IT community but the problem with any documentation that you have to internalize it to get clear understanding and even properly written explanations sometimes does not click for you until you do some hands on practice and, yes, internalize this information. Recently I finally decided to do some practice and create an app catalog from scratch in my test environment as well as jot down the steps which are easy to follow and more appropriate for those whose sole question is “I need an app catalog. How can I quickly set it up?”

Here is the steps:

1) Provision required service applications. You need to have Subscription Settings Service and App Management Service Applications provisioned and running. You need to use PowerShell to provision service apps:

Add-PSSnapin Microsoft.SharePoint.PowerShell

#Adjust -Identity parameter as necessary

$msa = Get-SPManagedAccount -Identity conundrum\sp_serviceapps

#Create the App Management Service Application

$AppPool = New-SPServiceApplicationPool -Name "AppManagementAppPool" -Account $msa

$AppManagement = New-SPAppManagementServiceApplication -Name "App Management Service" -ApplicationPool $AppPool

$AppManagementProxy = New-SPAppManagementServiceApplicationProxy -Name "App Management Service Proxy" -ServiceApplication $AppManagement

#Create the Subscription Settings Service Application

$AppPool2 = New-SPServiceApplicationPool -Name "SubSettingsAppPool" -Account $msa

$SubSettings = New-SPSubscriptionSettingsServiceApplication -Name "Subscription Settings Service" -ApplicationPool $AppPool2

$SubSettingsProxy = New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $SubSettings

Once this script has been executed make sure to start services from CA.

K2 - App Catalog required services

2) DNS part. You have to have separate app domain or wildcard CNAME  entry in existing domain (the latter is no go in production environments for security reasons). We need wildcard DNS entry just because we want dedicated DNS domain names for our apps but we don’t want to create new DNS records for each and every app which comes online. We also want to have our apps running in their own isolated DNS domain (separate TLD) outside of SharePoint – this is better isolation approach which comes with SP app model.

You can just create wildcard CNAME record in existing domain like that:

K2 - App Catalog Wildcard CNAME entry in existing domain

Once again this is “no go” from security POV and you either want separate TLD or sub-domain for your apps. Steps below describe how to create DNS sub-domain and wildcard CNAME entry in it.

Start DNS Manager snap-in, right-click on Forward Lookup Zones and select “New Zone…”

K2 - App Catalog creating sub-domain 1

Next you just go through New Zone wizard mostly accepting defaults with exception of the page where you have to specify your sub-domain name, which in my case is “apps.conundrum.com”:

K2 - App Catalog creating sub-domain 1 K2 - App Catalog creating sub-domain 2 K2 - App Catalog creating sub-domain 3 K2 - App Catalog creating sub-domain 4 K2 - App Catalog creating sub-domain 5 K2 - App Catalog creating sub-domain 6 K2 - App Catalog creating sub-domain 7

Once DNS sub-domain is created you can create wildcard CNAME entry which have to point to your SharePoint app server in your parent/main domain:

K2 - App Catalog sub domain CNAME record 1 K2 - App Catalog sub domain CNAME record 2

Here is how end result should look like in DNS Manager:

K2 - App Catalog sub domain CNAME record 3

What it gives you in the end? Thanks to wildcard CNANE DNS entry in sub-domain you can ping any name in this sub-domain and it always will be resolved to your SharePoint app server IP. Example:

K2 - App Catalog sub domain CNAME record - test

3) Create new App Catalog site collection. Go to CA > Apps > Manage App Catalog:

K2 - App Catalog creating App Catalog 1

Then select Create a new app catalog site and click OK:

K2 - App Catalog creating App Catalog 2

On the next page specify required values – Title, Web Site Address, Primary Site Collection Administrator and End Users, and click OK:

K2 - App Catalog creating App Catalog 3

After this App Catalog sites collection will be created and you will be able to browse it:

K2 - App Catalog creating App Catalog 4

4) Last touch 🙂 Configure App URLs. Go to CA and click on Apps to get to Configure App URLs link:

K2 - App Catalog Configure App URLs 1

On the next page you have to specify App domain and App prefix and  click OK These settings will shape your apps URLs.

K2 - App Catalog Configure App URLs 2

This concludes App Catalog configuration and you can now test your App Catalog. As proverb puts it “The proof of pudding is in eating” and by extension we can say that “The proof of App Catalog is adding some app(s) into it”.

Please follow and like us:
0

5 thoughts on “Provisioning SharePoint App Catalog in SP 2013/2016

  1. Dave

    Having an issue with this – all apps I publish after setting up the app catalogue as per the above seem to install, I can browse my App Catalogue and see them but when I click on them I get 404 page not found errors.Any ideas?

    Reply
    1. Mikhail Post author

      Not sure what exactly you are clicking on before getting 404, so can’t suggest anything… But I’m about to publish updated and more detailed blog post on App Catalog for SharePoint 2016 – so stay tuned for that 🙂

      Reply
      1. Dave

        Mikhail,I worked it out – its to do with SSL and creating an app subdomain, it won’t work like that – SSL gets all buggered up, even with a wildcard cert for your domain ie I have a Wildcard Cert for mydomain.com, I setup, as per your guide and others I found, apps.mydomain.com and installed the app catalogue to that. The result is constant SSL errors in the embedded apps while SharePoint itself is ok. Tried different certs, self signed etc with no luck.The ‘proper’ way to setup a SharePoint 2016 On Prem App Catalogue with SSL is to register a new domain, get a new wildcard ssl cert for that domain and use that new domain as per your article above.So, lets say my On Prem SharePoint is running on: https://intranet.mydomain.com, I’d purchase and register a new domain called myapps.net. Setup DNS as per your article with a new Forward Zone for myapps.net. Create the CNAME record and point it back to my SharePoint servers internal IP etc.While doing all that – buy a new Wildcard SSL cert for *.myapps.netI created a new Web Application (myapps.net) specifically for the App Catalogue so that I could use that new Wildcard Cert in IIS to bind to that site. Then deploy the App Catalogue as per your instructions (just make sure to change the web application it gets installed on in the wizard).

        Reply
  2. iger

    I do everything that you say and I generate the package, it does not generate any errors but when I upload it to the App for SharePoint library of Apps Catalog site, it gives me the following errors:

    There were errors when validating the App manifest.: Xml Validation Exception: ‘The ‘IsClientSideSolution’ attribute is not declared.’ on line ‘1’, position ‘256’., Xml Validation Exception: ‘The element ‘Properties’ in namespace ‘http://schemas.microsoft.com/sharepoint/2012/app/manifest’ has incomplete content. List of possible elements expected: ‘StartPage’ in namespace ‘http://schemas.microsoft.com/sharepoint/2012/app/manifest’.’ on line ‘1’, position ‘352’., Xml Validation Exception: ‘The element ‘App’ in namespace ‘http://schemas.microsoft.com/sharepoint/2012/app/manifest’ has incomplete content. List of possible elements expected: ‘AppPrincipal’ in namespace ‘http://schemas.microsoft.com/sharepoint/2012/app/manifest’.’ on line ‘1’, position ‘365’.

    Can you help me please? Thank a lot 🙂

    Reply
    1. Mikhail Post author

      Thanks for your question, my article only briefly describes how to provision SharePoint App Catalog in SP 2013/2016. In your case you are trying to deploy some app and getting errors complaining about app manifest off your app. So maybe try uploading another app or review specific lines in your app manifest – by all signs this is a problem with app manifest XML.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *