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.


My First Sharepoint-Hosted App in 2013

I would recommend to read Apps in SharePoint 2013 post before going through this one.
I want to create a SharePoint-Hosted App in 2013 using Visual Studio.
I have created a SharePoint 2013 machine with all required software.
Just as a best practice, even if you are creating a standalone server, enable Active Directory Domain Services.
SharePoint 2013 works better when the system is in a Domain, rather than in a workgroup.

So, I have installed Windows server 2012, enabled all required features. Installed Office 2013, SharePoint 2013, Visual Studio 2012 and Developer tools for SharePoint 2013.

Apps in Sharepoint 2013

Why Apps? What's wrong with Solutions?
The world is getting smaller day by day, thanks to technology. Big desktops became Bulky laptops. Bulky laptops became Notebooks. Notebooks became Ultra books. Now the trend is moving towards Tablets and Smart phones.
So does our applications. Web applications becoming Apps.


SharePoint 2013 Issues Encountered

These are the list of issues I encounter while working on SP 2013 on VS 2012.

While setting up SharePoint 2013 in standalone mode, there are 2 kinds of errors which we may encounter at step8.
Just like many people I ignored it and verified Central Admin and created an application. So thought everything is working. But when you create applications like apps, then you will start getting weird errors like "xxxxxx component is missing, try installing it again"

So clear these issues first and then proceed.


Understanding Sharepoint Custom Claims Provider

Before going into any details, we should answer the obvious question.
                                 Why Custom Claims Provider?
Simple ! Claims auth based on Windows based, Forms based or SAML based authentication will generate Claims. But mostly they may not be compatible with the claim information what we / application require.
Below is a claim set generated by STS in case of Claims with Windows.

For example, lets say Date of Birth is part of AD Group, and when user sign in to my site, i will get DOB as one of the claims. But task of my application is to categorize people into Kids (<18 Yrs), Youth (18 to 27), Middle Aged (27 to 40) and so on . . . which will be done by adding one more extra claim with respective values (kids, youth, middle aged . . . ), based on information provided by default claims(Age calculated from DOB). That task will be done by Custom Claim Provider.

Claims Based Authentication in Sharepoint

In this post we will try to understand the basics of Claims Based Authentication in SharePoint.
Lets start this with Claims.
Claim is a piece of information which will authenticate you with in a set of agreed parties.

Let me put it in a simple way for better understanding. If there is a carnival with entrance fee of 100 bucks and all the rides inside are free. When you enter carnival, you pay once and have the ticket with you. Now every time you get on a ride, you just need to show that entrance ticket. The person operating rides will trust the ticket granted by person near entrance.
So, Entrance ticket is the claim you carry.