Transferring DNS Hosting Services from Microsoft 365 CSP Subscriptions

When migrating Microsoft 365 CSP subscriptions, the connect_migration.py migration script skips subscriptions that include DNS hosting services used by domains. To migrate such subscriptions, you must transfer DNS hosting services used by domains from Microsoft 365 CSP subscriptions to other subscriptions. The procedure of transferring a DNS hosting service used by a domain from one subscription to another is switching that domain from the DNS hosting service resource of the first subscription to that of the second subscription.

Important: You can use the migration script to automatically transfer DNS hosting services used by domains only for the Microsoft 365 application (.NET endpoints, --sourcemodel odin).

With the connect_migration.py script, you can automatically transfer DNS hosting services used by domains from Microsoft 365 CSP subscriptions to other subscriptions. Before using the script to transfer DNS hosting services, make sure that the following conditions are satisfied for every Microsoft 365 CSP subscription that includes a DNS hosting service used by domains:

  • Under the customer account of that Microsoft 365 CSP subscription, there is a subscription that includes a DNS hosting service resource to which domains of that Microsoft 365 CSP subscription can be switched.

  • The DNS hosting resource of that subscription has the same settings as the DNS hosting resource of that Microsoft 365 CSP subscription:

    • The type of DNS hosting service

    • The list of name servers

    • DNS zone settings

We recommend that you transfer DNS hosting services by following these steps:

  1. Run the script in dry-run execution mode. (No DNS hosting service transfer 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 execution 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 OSS, check that DNS hosting services are transferred from the necessary Microsoft 365 CSP subscriptions.

Parameters

The parameters of the script that you can use when transferring DNS hosting services are in the table.

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.

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

How To Run the Script

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

python connect_migration.py transfer-domains [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 transfer-domains --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 transfer-domains --source-data subscription_ids.csv --sourcemodel odin --connect-products connect_product_descriptions.json --csp-nce-mapping csp_to_nce_license_mappings.csv

Script Output

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

...
Configure plans result             : ........................................ outresult/other_20220530T062327/transfer_domain_results.csv
Success configure plans            : ........................................ outresult/other_20220530T062327/transfer_domain_success.csv
Errors configure plans             : ......................................... outresult/other_20220530T062327/transfer_domain_errors.csv
Errors data to file                : ......................................................... outresult/other_20220530T062327/errors.csv
Warnings data to file              : ....................................................... outresult/other_20220530T062327/warnings.csv
Log file name                      : ........................................................................... migration_2022-05-30.log

Statistics:
---------------------------------------------------------------
transfer domains
---------------------------------------------------------------
domains for transfer in total .............................. 1
all transferred domains .................................... 1
transfer domains failures .................................. 0

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/other_<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/other_<TIMESTAMP>/transfer_domain_results contains information about all domains that were processed.

    • outresult/other_<TIMESTAMP>/transfer_domain_success.csv contains information about domains that successfully completed processing.

    • outresult/other_<TIMESTAMP>/transfer_domain_errors.csv contains information about domains that failed processing.

    • outresult/other_<TIMESTAMP>/errors.csv contains information about domains that completed processing with errors.

    • outresult/other_<TIMESTAMP>/warnings.csv contains information about domains that completed processing with warnings.