Migrate Microsoft 365 data

This section describes how to migrate Microsoft 365 data from version 9.6 to 9.6.2 of Snow License Manager. Please read section Microsoft 365 data model and this section carefully and follow the steps to complete the migration successfully.

EventStore

Microsoft 365 event-sourced data is saved in the Snow License Manager database in the ew schema. For more information about how event data is stored, see Snow Event Warehouse.

The default folder for migration to Snow License Manager 9.6.2 is the Database subfolder of %Programdata%\SnowSoftware\LicenseManager\EventStore path.

In Snow License Manager 9.5.1 to 9.6.1, there were quality issues with large quantities of Microsoft 365 data. Therefore, the migration job will by default migrate the EventStore (v2) that was available in Snow License Manager 9.4.1 and previous versions. If you recently have set up the Microsoft 365 integration connector or didn’t encounter any Microsoft 365 issues in Snow License Manager 9.5.1, you can choose to migrate EventStore (v3). Note also that data lost between the upgrade from Snow License Manager 9.5.1 to 9.6.2 will not be available from the start.

To migrate the subfolder o365 instead of migrating the default folder, perform the following steps:

  1. Stop SnowLicenseManagerOffice365Service.

  2. Navigate to the installation folder of the service, C:\Program Files\Snow Software\Snow License Manager\Services\Office365, and open the file appsettings.json.

    Tip

    The application Notepad can be used to edit the file.

  3. Update the setting UseOldEventStore to false.

  4. Save the file and start SnowLicenseManagerOffice365Service.

After the migration, the Database and o365 folder will be kept as a backup but will not be used by the system. However, you should not remove the EventStore files before the migration has completed because the files contain historical data.

Warning

From Snow License Manager 9.13, the EventStore is decomissioned completely as a service. To not loose any historic data, you are adviced to run an aggregation of the Microsoft 365 integration connector, at least once, while you are still on any version between 9.6.2 and 9.12.1.

SQL database changes

The database schema o365 will change when upgrading to Snow License Manager 9.6.2 and the data in o365 schema tables will be erased. For details on the schema changes, see Schema changes.

Preparations

Before the upgrade, verify that no data aggregation from Snow Integration Manager is running or scheduled. There is no need to take a backup of the EventStore.

Data migration

Snow License Manager is upgraded to version 9.6.2 through the Snow Update Service.

As soon as the upgrade is completed, the ew and o365 schema is recreated in Snow License Manager MSSQL database and the data migration process is initiated.

The progress of the data migration can be seen in the Office365 logs. It is not possible to see in Snow Update Service whether data migration has been successful or not. Snow Update Service will only display when the upgrade to version 9.6.2 has completed, and then trigger the start of data migration.

Note

The migration time depends on the Microsoft 365 data size and the number of historical events. You can't see any Microsoft 365 data in the Snow License Manager user interface before the migration has completed, so you should plan for this if you have a large event store. However, the Snow License Manager application will still be available during the migration.

The migration can run in parallel to the data update job. However, the migration will be slower if it is run in parallel.

Track the progress of the data migration

Read the Office365 log to track the data migration progress and verify its completion. The following texts will appear in the log in this given order:

  1. "Microsoft.EntityFrameworkCore.Migrations" and "Applying migration"

    In this phase the new o365 data schema will be applied to the SQL database.

  2. "Successfully connected to EventStore"

    Note

    If the EventStore is not started, there will be a log message stating that a connection to the EventStore could not be made. In that case, start the SnowLicenseManagerEventstoreService and also restart the SnowLicenseManagerOffice365Service.

  3. "Eventstore events Vn migration required. xyz events to migrate", where:

    • Vn depends on chosen EventStore folder to migrate.

      • V2 - migrate Database folder

      • V3 - migrate o365 folder

    • xyz is the number of events to migrate.

  4. The progress of the migration in percentage.

  5. "Migration completed"

    This means that all EventStore data has been migrated to ew and o365 database tables. After that Office365 compiles "user linking", user activities mapping and read models.

  6. Since the Users Per subscription Plan ReadModel typically is the largest one, this will most likely be the last ReadModel to complete. In that case, the last log message during the ReadModel refresh will be "Users Per subscription Plan ReadModel construction is completed".

Run another Snow Integration Manager aggregation

After the migration and the ReadModels have completed, run a new Snow Integration Manager aggregation to ensure that all links between users and subscriptions plans are updated correctly.

Differences in Snow License Manager after the migration

The data displayed in Snow License Manager may not be identical before and after the data migration, since changes may occur in the Microsoft 365 portal between the Snow Integration Manager aggregations. After the migration to Snow License Manager 9.6.2, specifically note the following:

  • Data aggregated from Snow Integration Manager versions older than 5.15 will not be visible in the Overview graph.

  • The Total users count only includes users with an assigned subscription plan.

  • The charts in the user interface are now only reflecting data until the last import.

  • If unknown subscription plans are present, please notify Snow Support.