Share via


SharePoint: How to Change authentication from classic mode to claims based

Situation

A SharePoint web application that was configured Mistakenly by using classic mode authentication. So the solution for me is to change the authentication mode to claims based.

Note: Be noted that once you migrated the authentication provider to claims based, you cannot revert it back.

Steps

From the central administration, I checked the authentication provider and it is showing my current authentication provider as windows. Now I am going to change my authentication provider, to do this, you need to use windows power shell.

From the start menu, go to

All Programs -> SharePoint 2010 products -> SharePoint 2010 Management Shell

Execute the following commands In order.

$WebAppName = http://aniish.com (Application name that you want to change the authentication)

$account = "Cosima\Administrator" (Account configured for Web APP)

$wa = get-SPWebApplication $WebAppName

Set-SPwebApplication $wa –AuthenticationProvider (New-SPAuthenticationProvider) –Zone Default

When you execute this command, a confirmation message will appear on the screen as follows.

Type Y for confirmation

After the command executed successfully, check the authentication provider from the central Administration, it will show “claims based authentication”

Now execute the following commands.

set the user as an administrator for the site

$wa = get-SPWebApplication $WebAppName

$account = (New-SPClaimsPrincipal -identity $account -identitytype 1).ToEncodedString()

configure the policy to enable the user to have full access

$zp = $wa.ZonePolicies("Default")

$p = $zp.Add($account,"PSPolicy")

$fc=$wa.PolicyRoles.GetSpecialRole("FullControl")

$p.PolicyRoleBindings.Add($fc)

$wa.Update()

perform user migration

$wa = get-SPWebApplication $WebAppName

$wa.MigrateUsers($true)

Reference:

http://technet.microsoft.com/en-us/library/gg251985.aspx

See more at: http://expertsharepoint.blogspot.de/2013/10/how-to-change-sharepoint-authentication.html

See Also