0

I did a 2010 to 2013 migration for a site collection. Is there a way to migrate users for a given site collection instead of web application? the following code is for web app. I dont want to touch the web app as its already running bunch of site collections. The 2013 farm is a fresh farm and not migrated from 2010.

$wa = Get-SPWebApplication -identity http://webapp
$wa.MigrateUsers($true)
  • I was under the impression that Site collection upgrade should convert the user name to claims friendly username (0#,w|domain\user) – Kevin Short Sep 1 '15 at 14:57
0

I did my upgrade some site collection/s at the time, moving them in separate databases. I answered a similar question a year ago so i'm going to quote myself from that thread.

While the official way to do it provided by Microsoft is to Migrate from classic-mode to claims-based authentication by converting a web application.

"However, i was planning to move site collections in a temporerary database, one at the time for several reasons. I searched and found this script that simply converts a database from Classic to Claims. I've used it for multiple databases and has not had one single error related to authentication in 2013.

The script is intended to be run AFTER the database has been mounted to the web application. ( mount-spcontentdatabse ). This script must be executed by your Farm account to. Check the source for the script for more information, and be sure to test it before using it in production if you decide to use it."

$wa = Get-SPWebApplication http://yourWebAppUrl 
$acc = 'domain\user' 
$arguments = New-Object Microsoft.SharePoint.Administration.SPWebApplication+SPMigrateUserParameters 
$arguments.AddDatabaseToMigrate($wa.ContentDatabases[1]) 
$wa.MigrateUsersToClaims($acc, $true, $arguments)

So, move a site collection from 2010 to its own temporary content database, move it a 2013 environment, mount it to a web application and then run the script. The important thing is that you have to target the script to the right database so if you have a new web application with one database and then attach a temporary content database, the database added order will be $wa.ContentDatabases[1]. If you have a web application with 3 databases and you mount a fourth database, the number should be $wa.ContentDatabases[3] as you start to count from 0.

I did this for all of our site collections in the spring -14 and we have not had any problems related to authentication after our migration.

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

Old thread: web application is configured with claims authentication mode however the content database you are trying to attach is intended

0

Short answer, no. But if you use Convert-SPWebApplication, it will only migrate the identities that have not been migrated yet.

  • A doubt here. Can't he write a small powershell script to get users from user information list of that site collection and just import it into the other site collection? – Akhoy Sep 1 '15 at 15:17
  • I am migrating few sites at a time from 2010 to 2013. I was under the impression the site upgrade would convert the users from classic to claims. I hate to run ps command against web apps. – Kevin Short Sep 1 '15 at 15:18
  • The conversion is done at the Web App level. There is no harm in running Convert-SPWebApplication multiple times. – Trevor Seward Sep 1 '15 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.