By Chris R. Chapman at May 05, 2010 16:58
Filed Under: sharepoint, sharepoint2010

I had to post this as I know that it’s been a burning issue for developers and admins who have tried, as per the directions of many web casts and promises from MCS types like myself, to change a “classic” authentication web app into a “claims based authentication” web app after creation.  Typically, after you’ve created the web app in classic mode, the radio button to change it to Claims is greyed out:

Edit_authentication

So the UI is a bust, however I’ve suspected that there is an easy way to get around this through PowerShell – via Chun Liu’s post, Forms-based Authentication on a Claims-based Web App, we have an answer.  Well, at least the start of an answer.  I had to do some minor tweaks to his script – here’s what you’d need to enter on the command line:

> [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
> $webapp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup("
http://mywebapp")
> $webapp.UseClaimsAuthentication = ‘True’;
> $webapp.Update()
> $webapp.ProvisionGlobally()

Do this on one of your classic auth web apps, and when you load up the Authentication Providers in Central Administration, it will now be Claims enabled.  Ta-da!

Please enjoy responsibly.

Update:  Of course, if you use the SharePoint 2010 Management Shell you can use the abbreviation $webapp = Get-SPWebApplication(http://mywebapp) instead of the long-hand I've used above.

Comments are closed

About Me

I am a Toronto-based software consultant specializing in SharePoint, .NET technologies and agile/iterative/lean software project management practices.

I am also a former Microsoft Consulting Services (MCS) Consultant with experience providing enterprise customers with subject matter expertise for planning and deploying SharePoint as well as .NET application development best practices.  I am MCAD certified (2006) and earned my Professional Scrum Master I certification in late September 2010, having previously earned my Certified Scrum Master certification in 2006. (What's the difference?)