I had wondered if the MigrateUser API and STSADM -o migrateuser operation would work with Forms Based Auth accounts in WSSv3, and just validated that it does Whoo Hoo!
For those of you unfamiliar with this addition to WSS, see the previous KB on this addition to WSSv2. It’s what I used from SPUserUtil back in the day to migrate accounts. In fact, there is a call out to it in the overview of the SharePoint Products and Technologies 2003 Software Development Kit. One of my fortunate claims to fame 🙂 But remember the disclaimer that they even have noted there:
Disclaimer: SharePoint Utility Suite provides a packaged collection of tools and utilities that demonstrate the rich object model that is delivered with the SharePoint Products and Technologies 2003 SDK (which includes documentation for Windows SharePoint Services 2.0 and SharePoint Portal Server 2003). This package includes code and tool examples that SharePoint developers and SharePoint administrators might find useful; however, the samples in the SharePoint Utility Suite are provided as is and are not supported.
Regardless, in WSSv2, it was an API extension to SPGlobalAdmin, but in WSSv3, it’s a method of the SPFarm object and of course it’s still exposed via STSADM.
When using it for a non Windows account, you have to specify the -ignoresidhistory flag for STSADM, or specify false for the enforceSidHistory argment to SPFarm.MigrateUserAccount(), but it works great.
stsadm -o migrateuser -oldlogin “fbaaspnetsqlmembershipprovider:fbauser2″ -newlogin”fbaaspnetsqlmembershipprovider:fbauser3” -ignoresidhistory
This will migrate my FBAUser2 account to FBAUser3 for the fbaaspnetsqlmembershipprovider I have setup.
Keep in mind, just as in V2, this does NOT update the Display Name nor the Email address for the account, and is something you’ll have to do post migration.
– Keith Richie