Share via


MigrateAccount(String, String, Bool) Method

The MigrateAccount method of the PortalAccountMigrationManager class updates SharePoint Portal Server with the new account information for the specified account.

Parameters

Return Value

Throws an exception if a fatal error is encountered; otherwise, returns true.

Example

The following code example shows how to use the MigrateUserAccount method to migrate one user account to another one.

MigrateAccount updates Microsoft Office SharePoint Portal Server 2003 settings only. Windows SharePoint Services settings should be updated first by way of its MigrateUserAccount method. It is recommended that the Windows SharePoint Services migration API be run before running this Microsoft Office SharePoint Portal Server 2003 API.

Remarks

The MigrateAccount method finds any Microsoft Office SharePoint Portal Server 2003 settings associated with the NT login or security ID (SID) of the account specified by strOldAccountName, and replaces them with the SID and NT login of the account specified by strNewAccountName. If bEnforceSidHistory is true, it requires that a SID is found for strOldAccountName and that it is part of the Active Directory SID history of the account specified by strNewAccountName.

For added security, it is recommended that bEnforceSidHistory be set to true when calling MigrateAccount. It is recommended that bEnforceSidHistory be set to false only when SID history is unavailable or incomplete.

For more on SID history in Active Directory, see this.

After MigrateAccount finishes successfully, the following Microsoft Office SharePoint Portal Server 2003 settings are updated for all portals in the farm:

  • User profile information
  • Area contact information
  • Person listing information
  • Audience rule information

MigrateAccount updates all portals in a server farm. It should only be run once per server farm. MigrateAccount must be called in the context of a user with Central Administrator privileges on the farm that is being updated.

In an intra-farm shared services scenario, the master portal and all child portals in the farm are updated.

In an inter-farm shared services scenario, MigrateAccount should be run once on the child farm and once on the master farm.

MigrateAccount updates Microsoft Office SharePoint Portal Server 2003 settings only. Windows SharePoint Services settings should be updated first by way of its MigrateUserAccount method. It is recommended that the Windows SharePoint Services migration API be run before running this Microsoft Office SharePoint Portal Server 2003 API.

If an error is encountered, an exception will be thrown. The exception should contain an error message with information on why it was thrown.

To get more detailed information on the migration, see the portal diagnostic log. The log will be named after the executable that called MigrateAccount, and the timestamp of the log's creation will be appended. To view more information, set the logging level for third-party applications to Information.

Requirements

Platforms: Microsoft Windows Server 2003