Performing the Migration

Prerequisites

Before you start the migration, make sure that you do the following:

  1. Convert all service plans with Microsoft 365 CSP subscriptions that you are going to migrate using Switch Plan Mode to a configuration with no included resources. For the instructions, refer to this article.

  2. Shift all service plans and subscriptions that you are going to migrate using Switch Plan Mode to Rating Engine. For the instructions, refer to this article.

Migration Procedure

Migration is performed with the connect_migration.py script. We recommend that you perform the migration by following these steps:

  1. Run the script in dry-run execution mode. (No migration is actually performed in this execution mode.)

  2. Check the report and log files produced by the script. If there are any issues, analyze and fix them before running the script in production mode.

  3. Run the script in production execution mode.

  4. Check the report and log files produced by the script. If there are any issues, analyze and fix them.

  5. In BSS, check the orders created by the script. If there are any issues, analyze and fix them.

    Important: (for New Subscription Mode) After you fix those issues and the failed orders are processed, you must cancel the appropriate source subscriptions. You can do that manually or by re-running the script as described in Resuming the Migration.

Parameters

The parameters of the script that you can use when performing the migration are in the tables.

Migration-specific Parameters

Parameter name Mandatory Description
--migrationmode Yes

The migration mode of the script. You must specify one of these values, depending on which migration mode you need:

  • new (for New Subscription Mode)

  • switch (for Switch Plan Mode)

To learn the preconditions and how migration is performed depending on the migration mode, see Supported Migration Modes.

Important: Switch Plan Mode is not supported for CSP Connect Extension.

--allow-addons No

(For Switch Plan Mode only) Defines whether to allow the migration of subscriptions that include add-on Microsoft 365 CSP licenses. By default, this ability is disabled.

Note: This parameter is ignored when the script is run in New Subscription Mode. In this migration mode, the migration of subscriptions that include add-on Microsoft 365 CSP licenses is allowed by default.

--migrationprogram No

(For Switch Plan Mode only) Defines which migration program must be used for migration orders. A migration program defines how a customer is charged for the subscription created after processing a migration order. The following values are supported:

  • count: The customer is charged for the billing period in which the migration is performed.

  • do-not-count: The customer is not charged for the billing period in which the migration is performed.

  • prorate: The customer is charged for the period between the migration date and the end date of the billing period in which the migration is performed.

To learn more on migration orders and the migration programs they support, please refer to the APS SDK documentation.

Warning: You must specify the migration program that meets your business needs.

Important: Each migration program requires a specific CloudBlue Commerce version. See Requirements to learn which CloudBlue Commerce version is required for which migration program.

Note: Migration orders are created by the script when migrating Microsoft 365 CSP subscriptions that include add-on Microsoft 365 CSP licenses.

--for-expiration-date No

With this parameter, you can migrate only those CloudBlue Commerce subscriptions whose Microsoft subscriptions have a specific expiration date.

To specify an expiration date, you must use the YYYY-MM-DD format and enclose that date in single quotes. For example: --for-expiration-date '2022-04-12'

Your CSV file specified in the source-data parameter must have the following columns:

  • OaCustomerId: The CloudBlue Commerce identifiers of customer accounts

  • OaSubscriptionId: The CloudBlue Commerce identifiers of source CloudBlue Commerce subscriptions

  • MsCommitmentEndDate: The expiration dates for the Microsoft subscriptions of the source CloudBlue Commerce subscriptions.

To learn how to prepare that CSV file, see Getting Microsoft 365 Subscription Expiration Dates.

Note: This parameter can be used only with the source-data parameter.

--skip-mca-check No

When started, for every customer account, the script checks whether the Microsoft Customer Agreement (MCA) was accepted by the owner of that customer account. Each check may take up to several seconds as the script makes calls to the Microsoft APIs.

Important: When migrating Microsoft 365 CSP subscriptions of CSP Connect Extension, the script does not check whether the MCA was accepted by subscription owners.

When specified, the script does not perform that check.

Important: You can use this parameter only for test runs. For example, you can specify it when you evaluate how the migration script works.

Warning: Do not use this parameter for actual migration.

--skip-nce-eligibility No

When started, the script checks whether every Microsoft 365 CSP license can be upgraded to a Microsoft 365 NCE license. Each check may take up to several seconds as the script makes calls to the Microsoft APIs.

When specified, the script does not perform that check.

Important: You can use this parameter only for test runs. For example, you can specify it when you evaluate how the migration script works.

Warning: Do not use this parameter for actual migration.

--threads No

The number of threads to be created for performing the collection and validation of migration data (from 0 to 16).

If not specified or specified with the 0 value, the script automatically determines how many threads it needs to create based on the number of CPU cores in your system.

--threads-l2 No

The number of threads to be created for migrating the source subscriptions of a customer account (from 0 to 4). If not specified, up to 2 threads are created per customer account being processed.

If specified with the 0 value, the script automatically determines how many threads it needs to create based on the number of CPU cores in your system.

For example, if your typical customer account has 3 source subscriptions, set this parameter to 3.

--threads-l3 No

The number of threads to be created for processing customer accounts with source subscriptions (from 0 to 32). If not specified, up to 8 threads are created.

If specified with the 0 value, the script automatically determines how many threads it needs to create based on the number of CPU cores in your system.

--timeout-order-process No

Orders processing consists of two phases:

  • Phase 1: The migration script creates all necessary orders for Microsoft 365 CSP subscriptions. After those orders are created, the second phase begins.

  • Phase 2: The migration script periodically checks the orders created during the first phase. It waits 600 seconds (the default timeout interval for order completion) for each order to either successfully complete or fail. When all orders created for a Microsoft 365 subscription complete, each within its own timeout interval, that subscription is considered migrated.

    Note: For New Subscription Mode, the script also creates cancellation orders for Microsoft 365 CSP subscriptions whose sales orders successfully completed. Those cancellation orders are processed in the same way as orders created during the first phase.

With this parameter, you can redefine the default timeout interval for order completion of 600 seconds (from 60 to 86400).

Note: In the first phase, the majority of operations is performed within your CloudBlue Commerce installation. In the second phase, the majority of operations is performed on the CloudBlue Connect and Microsoft sides.

Important: If an order created for a Microsoft 365 CSP subscription does not complete successfully during order processing, you must complete the migration of that Microsoft 365 CSP subscription. You can do that manually or by re-running the script as described in Resuming the Migration.

--custom-order-params No When specified, the migration script performs the migration so that Microsoft 365 NCE subscriptions and their orders will obtain the same Reseller Billing Option Message (ID: ResellerType) and Markup (ID: Margin) custom attributes as their source Microsoft 365 CSP subscriptions.

General Parameters

Parameter name Mandatory Description
--source-data Yes
  • The path to a CSV file that contains the identifiers of the subscriptions that you need to migrate. That file must have a column named OaSubscriptionId. In that column, you must specify the identifiers of those subscriptions. For example:

    subscription_ids.csv

    OaSubscriptionId
    1000098
    1000099
  • The path to a CSV file that contains the identifiers of the customer accounts whose subscriptions you need to migrate. That file must have a column named OaCustomerId. In that column, you must specify the identifiers of those customer accounts. For example:

    customer_account_ids.csv

    OaCustomerId
    1000098
    1000099

If you want the script to migrate only those CloudBlue Commerce subscriptions whose Microsoft subscriptions have a specific expiration date, you must:

  1. Use a CSV file where expiration dates are specified in the MsCommitmentEndDate column for the Microsoft subscriptions of the source CloudBlue Commerce subscriptions. To prepare that CSV file, follow the instructions in Getting Microsoft 365 Subscription Expiration Dates.

  2. Specify the expiration date you need in the for-expiration-date parameter when migrating subscriptions with the script, as described in Performing the Migration.

Note: The source-data, accounts, resellers, and subscriptions parameters are mutually exclusive. You must use only one of them when running the script.

--accounts Yes

The identifiers of the customer accounts whose subscriptions you need to migrate. These identifiers must be separated with commas and enclosed in single quotes. For example: '1000098,1000099'

Note: The source-data, accounts, resellers, and subscriptions parameters are mutually exclusive. You must use only one of them when running the script.

--resellers Yes

The identifiers of the reseller accounts whose direct customers have subscriptions intended for the migration. These identifiers must be separated with commas and enclosed in single quotes. For example: '1000098,1000099'

Note: The source-data, accounts, resellers, and subscriptions parameters are mutually exclusive. You must use only one of them when running the script.

--subscriptions Yes

The identifiers of the subscriptions you need to migrate. These identifiers must be separated with commas and enclosed in single quotes. For example: '1000098,1000099'

Note: The source-data, accounts, resellers, and subscriptions parameters are mutually exclusive. You must use only one of them when running the script.

--sourcemodel Yes

The type of the application or extension whose subscriptions you need to migrate. You must specify one of these values, depending on which application or extension is installed:

  • odin (for the Microsoft 365 application)

  • softcom (for the O365_APS2 application)

  • csp-extension (for CSP Connect Extension)

--connect-products Yes The path to a JSON configuration file that contains CloudBlue Connect product descriptions. You must specify the path to the file that you prepared in Preparing a JSON Configuration File with Target Product Descriptions. For example: connect_product_descriptions.json
--csp-nce-mapping Yes The path to a CSV configuration file that contains the mappings between Microsoft 365 CSP licenses and Microsoft 365 NCE licenses. You must specify the path to the file that you prepared in Preparing a CSV Configuration File with CSP to NCE License Mappings. For example: csp_to_nce_license_mappings.csv
--dry-run No

When specified, the script is run in dry-run execution mode. In this mode, the script performs checks and stores the results in report and log files. No actual actions are performed.

Important: We recommend that you first run the script in dry-run execution mode and check the report and log files produced by the script.

--verbose No When specified, the script writes more details to its log files.
--out-root-path No

The root directory for log and report files produced by the script.

By default, the script uses the directory where it is placed as the root directory.

Note: If the root directory that you specified does not exist, the script will create it.

--om-workload No Defines the maximum number of requests to the Order Management component's API that the migration script can perform simultaneously (from 1 to 16). By default, this parameter is set to 4.
--oa-api-user No The username of a user for connecting to the OSS and BSS XML-RPC APIs. You must specify it if HTTP authentication is turned on for the APIs.
--oa-api-user-password No The password of a user for connecting to the OSS and BSS XML-RPC APIs. You must specify it if HTTP authentication is turned on for the APIs.
--allow-fake-annual No

When specified, the script allows you to migrate Microsoft 365 CSP subscriptions that have one-year billing and subscription periods on the CloudBlue Commerce side and include Microsoft 365 CSP licenses that have one-month billing periods on the Microsoft side.

After the migration, new Microsoft 365 NCE subscriptions will have one-year billing and subscription periods on the CloudBlue Commerce side and include Microsoft 365 NCE licenses that have one-year billing periods on the Microsoft side.

Important: This ability is supported only for the migration of subscriptions of the O365_APS2 application in New Subscription migration mode.

Notes:

- The --allow-fake-annual and --monthly-term parameters are mutually exclusive. You must use only one of them when running the script.

- Do not specify this parameter when configuring upgrade paths or transferring DNS hosting services.

--monthly-term No

When specified, the script performs the migration so that the migrated subscriptions will have one-month billing and subscription periods regardless of their initial billing and subscription periods.

Important: This ability is supported only for New Subscription migration mode.

Notes:

- The --allow-fake-annual and --monthly-term parameters are mutually exclusive. You must use only one of them when running the script.

- Before using this parameter, make sure that you have the appropriate Microsoft 365 NCE service plans with one-month billing and subscription periods.

- Do not specify this parameter when configuring upgrade paths or transferring DNS hosting services.

--annual-subscription-period No

When specified, the script allows you to migrate Microsoft 365 CSP subscriptions that have subscription periods of 2 years, 3 years, 12 months, 24 months, and so on. To migrate such subscriptions, the script will use Microsoft 365 NCE service plans that contain suitable licenses and have one-year subscription periods. As a result, after the migration, such subscriptions will have one-year subscription periods.

Notes:

- Before using this parameter, make sure that you have the appropriate Microsoft 365 NCE service plans with one-year subscription periods.

- Do not specify this parameter when transferring DNS hosting services.

--csv_migration_ignored_resources_file No

By default, the script skips Microsoft 365 CSP subscriptions that include non-Microsoft 365 resources with non-zero limits. With this parameter, you can migrate Microsoft 365 CSP subscriptions that include non-Microsoft 365 resources with non-zero limits and unprovision those non-Microsoft 365 resources during migration. To do that, follow these steps:

  1. Prepare a CSV file with a column named MigrationIgnoredResourceTypeId.

  2. In that column, specify the CloudBlue Commerce identifiers of the non-Microsoft 365 resources that you need.

  3. Specify the path to the CSV file when running the script with this parameter. For example: --csv_migration_ignored_resources_file ignored-non-microsoft-365-resources.csv

Important:

- The specified non-Microsoft 365 resources are unprovisioned during migration.

- This parameter is supported only for the Microsoft 365 application.

Note: Do not specify this parameter when transferring DNS hosting services.

--plans-mapping No

By default, when configuring upgrade paths (for Switch Plan Mode only) or migrating subscriptions (for both migration modes), if the migration script finds several suitable Microsoft 365 NCE service plans for a license of a Microsoft 365 CSP service plan, it uses the Microsoft 365 NCE service plan whose service plan identifier is largest.

With this parameter, you can override this default behavior and specify which of many suitable Microsoft 365 NCE service plans must be used for a license of a Microsoft 365 CSP service plan.

Important: This parameter is supported only for the Microsoft 365 application.

Note: Do not specify this parameter when delegating service plans or transferring DNS hosting services.

To use this parameter, complete these steps:

  1. Prepare a CSV file with the CspPlanId and NcePlanIds columns.

  2. For each vendor account that has customer accounts with Microsoft 365 CSP subscriptions that you need to migrate, and for each required Microsoft 365 CSP service plan, add a mapping to the CSV file:

    1. In the CspPlanId column, specify the identifier of that Microsoft 365 CSP service plan.

      Important: You must obtain the service plan identifier in the control panel of the vendor account that you are creating the mapping for.

    2. In the NcePlanIds column, specify the identifiers of the Microsoft 365 NCE service plans that must be used for the licenses of that Microsoft 365 CSP service plan. To separate identifiers, use a colon (:).

      Important: You must obtain the service plan identifiers in the control panel of the vendor account that you are creating the mapping for.

  3. When running the migration script with this parameter, specify the path to the CSV file that you prepared. For example: --plans-mapping csp-to-nce-service-plan-mappings.csv

Examples of CSP to NCE service plan mappings:

  • Example 1:

    CspPlanId,NcePlanIds
    100,1001

    A reseller account has service plans #100, #1001, and #1011. Microsoft 365 CSP service plan #100 includes a base Microsoft 365 CSP license. For that base Microsoft CSP license, there are two suitable Microsoft 365 NCE service plans that include the appropriate base Microsoft 365 NCE license: #1001 and #1011. To avoid ambiguity, Microsoft 365 CSP service plan #100 is mapped to Microsoft 365 NCE service plan #1001.

  • Example 2:

    CspPlanId,NcePlanIds
    200,2001:2002

    A reseller account has service plans #200, #2001, #2011, #2002, and #2012. Microsoft 365 CSP service plan #200 includes a base Microsoft CSP license and an add-on Microsoft 365 CSP license. For that base Microsoft CSP license, there are two suitable Microsoft 365 NCE service plans that include the appropriate base Microsoft 365 NCE license: #2001 and #2011. For that add-on Microsoft 365 CSP license, there are two suitable Microsoft 365 NCE service plans that include the appropriate add-on Microsoft 365 NCE license: #2002 and #2012. To avoid ambiguity, Microsoft 365 CSP service plan #200 is mapped to Microsoft 365 NCE service plans #2001 and #2002.

-h No When specified, the script prints its parameters and their short description.

How To Run the Script

New Subscription Mode

To run the script, go to the respective directory on your server and execute this command:

python connect_migration.py migration --migrationmode new [OTHER PARAMETERS]

Here are some examples of various scenarios:

  • Run the script in dry-run execution mode for the Microsoft 365 application:

    python connect_migration.py migration --migrationmode new --dry-run --source-data subscription_ids.csv --sourcemodel odin --connect-products connect_product_descriptions.json --csp-nce-mapping csp_to_nce_license_mappings.csv
  • Run the script in production execution mode for the Microsoft 365 application:

    python connect_migration.py migration --migrationmode new --source-data subscription_ids.csv --sourcemodel odin --connect-products connect_product_descriptions.json --csp-nce-mapping csp_to_nce_license_mappings.csv
  • Run the script in dry-run execution mode for the O365_APS2 application:

    python connect_migration.py migration --migrationmode new --dry-run --source-data subscription_ids.csv --sourcemodel softcom --connect-products connect_product_descriptions.json --csp-nce-mapping csp_to_nce_license_mappings.csv
  • Run the script in production execution mode for the O365_APS2 application:

    python connect_migration.py migration --migrationmode new --source-data subscription_ids.csv --sourcemodel softcom --connect-products connect_product_descriptions.json --csp-nce-mapping csp_to_nce_license_mappings.csv
  • Run the script in dry-run execution mode for CSP Connect Extension:

    python connect_migration.py migration --migrationmode new --dry-run --source-data subscription_ids.csv --sourcemodel csp-extension --connect-products connect_product_descriptions.json --csp-nce-mapping csp_to_nce_license_mappings.csv
  • Run the script in production execution mode for CSP Connect Extension:

    python connect_migration.py migration --migrationmode new --source-data subscription_ids.csv --sourcemodel csp-extension --connect-products connect_product_descriptions.json --csp-nce-mapping csp_to_nce_license_mappings.csv

Plan Switch Mode

To run the script, go to the respective directory on your server and execute this command:

python connect_migration.py migration --migrationmode switch [OTHER PARAMETERS]

Here are some examples tailored to various scenarios:

  • Run the script in dry-run execution mode for the Microsoft 365 application:

    python connect_migration.py migration --migrationmode switch --dry-run --allow-addons --migrationprogram prorate --source-data subscription_ids.csv --sourcemodel odin --connect-products connect_product_descriptions.json --csp-nce-mapping csp_to_nce_license_mappings.csv
  • Run the script in production execution mode for the Microsoft 365 application:

    python connect_migration.py migration --migrationmode switch --allow-addons --migrationprogram prorate --source-data subscription_ids.csv --sourcemodel odin --connect-products connect_product_descriptions.json --csp-nce-mapping csp_to_nce_license_mappings.csv
  • Run the script in dry-run execution mode for the O365_APS2 application:

    python connect_migration.py migration --migrationmode switch --dry-run --allow-addons --migrationprogram prorate --source-data subscription_ids.csv --sourcemodel softcom --connect-products connect_product_descriptions.json --csp-nce-mapping csp_to_nce_license_mappings.csv
  • Run the script in production execution mode for the O365_APS2 application:

    python connect_migration.py migration --migrationmode switch --allow-addons --migrationprogram prorate --source-data subscription_ids.csv --sourcemodel softcom --connect-products connect_product_descriptions.json --csp-nce-mapping csp_to_nce_license_mappings.csv

Script Output

After each run, the script outputs migration statistics and the location of its log and report files to your console. For example:

...
Report for subscription #1000122    : ............................. outresult/m365_20220413T134952/subscriptions/subs_C1000048_1000122.csv

Errors data to file                 : .......................................................... outresult/m365_20220413T134952/errors.csv
Warnings data to file               : ........................................................ outresult/m365_20220413T134952/warnings.csv
Results migrated subscriptions      : ................................................. outresult/m365_20220413T134952/migrate_results.csv
Failed migrated subscriptions       : ............................................ outresult/m365_20220413T134952/fail_migrate_results.csv
Successful migrated subscriptions   : ......................................... outresult/m365_20220413T134952/success_migrate_results.csv
Total results migrated subscriptions: ......................................... outresult/m365_20220413T134952/total_migration_results.csv

Log file name                       : ........................................................................... migration_2022-04-13.log

##############################################################
### dry-run mode                                           ###
##############################################################

Statistics:
---------------------------------------------------------------
preparation phase
---------------------------------------------------------------
connect products (configured and available) ................ 1
customers total ............................................ 5
customers ready for migration .............................. 0
customers with errors ...................................... 5
customers with warnings .................................... 3
subscriptions total ........................................ 10
subscriptions prepared for migration  ...................... 0
subscriptions with errors .................................. 10
subscriptions with warnings ................................ 0
---------------------------------------------------------------
migration phase
---------------------------------------------------------------
customers migrated to connect .............................. dry-run mode
subscriptions migrated to connect .......................... dry-run mode
subscriptions with migration errors ........................ dry-run mode
---------------------------------------------------------------

Done.
...

Log and Report Files

  • The script writes log records to files named migration_<YYYY-MM-DD>.log. Log records are appended to the same log file for each day.

  • After each run, the script generates these reports:

    • outresult/m365_<TIMESTAMP>/load_input_data_warning.csv contains warnings that appear when input data is loaded.

      Note: This report is not created if input data is loaded without warnings.

    • outresult/m365_<TIMESTAMP>/subscriptions/subs_C<CUSTOMER_ACCOUNT_ID>_<SOURCE_SUBSCRIPTION_ID>.csv contains detailed information about a subscription of a customer account.

    • outresult/m365_<TIMESTAMP>/errors.csv contains information about subscriptions whose processing completed with errors.

    • outresult/m365_<TIMESTAMP>/warnings.csv contains information about subscriptions whose processing completed with warnings.

    • outresult/m365_<TIMESTAMP>/migrate_results.csv contains information about all subscriptions.

    • outresult/m365_<TIMESTAMP>/fail_migrate_results.csv contains information about failed subscriptions.

    • outresult/m365_<TIMESTAMP>/success_migrate_results.csv contains information about successfully migrated subscriptions.

      Note: After you run the script in dry-run execution mode, it will write the identifiers of subscriptions that are ready for migration in a report file named outresult/m365_<TIMESTAMP>/success_migrate_results.csv. You can then use that file as an input file when running the script in production execution mode.

    • outresult/m365_<TIMESTAMP>/total_migration_results.csv contains total migration results.

CloudBlue, an Ingram Micro business, uses cookies to improve the usability of our site. By continuing to use this site and/or logging in you are accepting the use of these cookies. For more information, visit our Privacy Policy.