Sharepoint 2013 - Avoiding Azure on Dev Box

Let us have a look at this error.
" The parameter 'token' cannot be a null or empty string "
" Microsoft.SharePoint.SPException: The Azure Access Control service is unavailable "

We might have encountered these issues in initial days of working with Apps.
To be specific, this happens with Auto Hosted or Provider Hosted SharePoint Apps.

In both of these kind, the TokenHelper class will try to access your Azure Security Principle by default.
Means, if you installed Office 365, you will have a MS Account associated, which by default will be associated to an Azure account within. Thus the Azure security principal will be captured and WebSecurityToken will be generated.

Problem is, either you might have installed Office 2013 or you don't have a valid Azure account on your Development machine. In that scenario, you will encounter this issue.

So, I cannot tell you how to resolve this issue, because it will be resolved with a valid Azure account which most of us cannot afford to have on our Development machines.

So, lets avoid it.

Step 1:  If you named your App as "XXXX", then the Web application will be created with name "XXXXWeb". So go to properties of "XXXXWeb" and change the SSLEnabled to false.

Step 2:  Go to "XXXX" and right click on AppManifest.Xml and select "View Code".
Replace the tag as shown below.
Replacing the AppPrincipal with internal, signifies that we are not going to use Azure Platform for hosting so, the App can use internal Windows authentication, instead of Azure Access Control Service.

Step 3:  Go to "XXXXWeb" project and open Default.aspx.cs file and comment out the default code provided in Page_Load method.

Now, you can deploy the Provider Hosted/ Auto Hosted Apps in your local dev box. The Web application will be deployed in different location from your SharePoint Farm, and you can host the App in your SharePoint site.


  1. Hi,

    I have used Office 365 preview(SharePoint 2013 Online) but when getting start to create App-hosted app project.got error like this.same issue causes as you describe in your post?any ways to solved this with Azure project?


  2. Hi,

    After a long search in so many blogs, finally I got your post which resolves my issue.
    Thanks for posting.

  3. Thank-you for your post. It got me past the ACS issue. Now I am having a local iis authentication issue, but still, your post was spot on in regards to the azure acs missing link. Thanks!

  4. thank-you for your post. It was very helpful. I am publishing a LightSwitch HTML Client to provider hosted (non-office365) SP server and could not find an answer to the Azure ACS issue.
    Now, I just have to hurdle the localost authentication problem, as the app is installed and can be run, but it loops continuously for a login to my local server from the SP app. Back to Bing for answers...

  5. Life saver.. I have not other words. I m new to SP, have been googling and reading books on how to start my first APP and encountered nothing but problems. Your post was that small light at the end of a dark tunnel that gave me a bit of more strength to keep fighting this sharepoint thing....
    T H A N K Y O U

  6. Hi, I know this post is rather old, however, I cannot find the SSLEnabled property. I right-click on the web properties, but nowhere can I find the setting. Is there more info that you can provide. I am using Visual Studio 2017