Thursday, March 21, 2013

SharePoint2013: ProviderHosted app, You can't add this app here: sorry apps are turned off

Scenario: When I tried to add a ProviderHosted app with ACS trust on to SharePoint site from app catalog. The app itself was disabled with a message "You can't add this app here". Clicking on "find out why" displayed the message "sorry, apps are turned off. if you know who runs the server, tell them to enable apps".

Solution: When we see this message with SharePoint hosted apps, the resolution is to check if appdomain has been created. Both the App Management and subscription setting services have been created and started. App URLs have been configured from central admin. App routing is enabled by creating additional binding to the webapp OR by creating additional webapp for app routing.

But, most of the above settings are not required for ProviderHosted apps, like App Domain is not required for provider hosted apps, need not "Configure App Urls" from CA. Then what might be the issue with providerHosted apps...well, so far I have uncovered two reasons as to why we encounter error message "sorry, apps are turned off.  if you know who runs the server, tell them to enable apps"." there are as follows:-

1. For provider hosted apps to run with ACS as trust broker, we need to replace the default SharePoint STS cert with self-signed cert or publically owned cert. And this cert has to be uploaded to Azure/office 365 tenancy. So in my case the error message was showing up because, the cert was not uploaded to Azure/office 365 tenancy.

2. Another reason might be that your STS cert has expired, in which case you might have to get new cert or renew existing cert and register the new cert with Azure/office 365

No comments:

Post a Comment