Move user accounts to a different BlackBerry Enterprise Server

You can use the moveUsers() method to move a user from one BlackBerry® Enterprise Server to another in your BlackBerry Domain. If you are only moving one user account, you can use the moveUser() method in a similar manner.
Before you begin: Obtain the following objects and attributes:
  • The user account IDs userIDs of the users you want to move
  • The dispatcher host service instance targetDispatcherInstance that you want to move the users to
  1. Create the UserMoveBlackBerryAttributes object that is required as a parameter of moveUsers().
    UserMoveBlackBerryAttributes userMoveBBAttributes=new UserMoveBlackBerryAttributes(); 
    userMoveBBAttributes.setServiceInstance(targetDispatcherInstance);
    userMoveBBAttributes.setTargetServiceInstance(targetDispatcherInstance); 
    userMoveBBAttributes.setIgnoreDuplicateWarning(false);
    userMoveBBAttributes.setIgnoreEncryptionWarning(false);
    userMoveBBAttributes.setIgnoreInactiveTargetWarnings(false); 
  2. Invoke moveUsers().
    MoveUserResult moveUsersResult = coreWebService.moveUsers(userIds, userMoveBBAttributes);
  3. Handle any errors that occur.
    if (moveUsersResult.getMoveUsersReturnStatus().getCode() != MoveUserReturnStatusEnumType.SUCCESS) 
    {
            // handle any errors
    }

Was this information helpful? Send us your comments.