Wednesday, July 24, 2013

Authentication issues after upgrading to Sharepoint 2013 - "Sorry, this site hasn't been shared with you"

Recently I ran into this problem after restoring a site collection backup in Sharepoint 2013.

The roles and permissions were all there but all users still got this message

"Sorry, this site hasn't been shared with you."

Very annoying. What could be causing this?

After some googling I came across this on technet

Migrate from classic-mode to claims-based authentication in SharePoint 2013

The source site collection for the backup was originally upgraded from Sharepoint 2010 to 2013, and claims authentication was not enabled.

I ran the following powershell commands to switch from classic to claims based authentication

$WebAppName = "<Web App Url>"
$wa = get-SPWebApplication $WebAppName
$wa.UseClaimsAuthentication = $true
$wa.Update()
$wa.MigrateUsers($true)

$wa.ProvisionGlobally()

Users were able to successfully authenticate after running the above commands. Problem Solved.