Thursday, July 25, 2013

Convert existing SharePoint Web Application from Classic Mode Authentication to Claims based Authentication

If you want to use FBA (Forms Based Authentication) with SharePoint you can, but you will need for the web application to be setup in Claims based Authentication instead of Classic Mode Authentication. One option would be to delete the application and re-create it using Claims based Authentication. While technically possible, it is a lot of work and not necessary. Instead, try using Powershell to solve this problem in seconds. Try the following:
  1. Open SharePoint Management Shell by going to Start Menu | All Programs | Microsoft SharePoint 2010 Products. Now right-click SharePoint 2010 Management Shell and choose Run as administrator.
  2. Now go the following Powershell commands:

    PS> $app = Get-SPWebApplication "http://yourSpHost:7777"
    PS> $app.UseClaimsAuthentication = "True"

    PS> $app.Update()
  3. To verify the change: Go to Central Administration | Manage web applications, and select the application you modified.
  4. Click the Authentication Providers button in the Web Applications ribbon. It will now show Claims Based Authentication.
NOTE: if you get the error: "The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered." try some of my fixes outlined here

No comments: