Recently, I was in a
situation to enable form authentication for our satellite farms. 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.
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
The power shell window
is opened as follows.
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)
If All the above
Commands Executed, Authentication will be change successfully.
No comments:
Post a Comment
Your feedback is Much Appreciated. I will try to reply to your queries as soon as possible!!Anil Avula