Migration To SharePoint Online - Code Remediation - Part Two


Migration from SharePoint OnPremise to SharePoint Online primarily involves two stages,
  1. Migration of Data to SharePoint Online (Previous article)
  2. Migration of Customizations to SharePoint Online (This article)
In SharePoint OnPremise environments, we can write full trust solutions using server-side APIs. However, the same code cannot run on SharePoint Online. We need to utilize client-side APIs to code against SharePoint Online.

In this article, we will have a look into possible options to migrate full trust solutions to SharePoint Online.

Code Remediation

Office 365 does not support farm solutions and therefore, the SharePoint add-in model (Classic sites) or SharePoint Framework solutions (Modern sites) are needed to remediate the custom components.

Transform farm solutions to the SharePoint add-in model

Transforming farm solutions to the SharePoint add-in model involves analyzing existing extensions, designing and developing a new app for SharePoint, and then testing and deploying add-in in the O365 environment. The server-side code needs to be redeveloped using the SharePoint App / Add-in model.

O365 development options
  • CSOM
  • JSOM
Hosting options
  • SharePoint hosted
  • Provider hosted (Microsoft Azure)
  • SharePoint Framework (Modern sites) - MS Azure Storage / Office 365 Public CDN
Plan the transformation process

To ensure the maximum availability of functionalities from the OnPremise environment and minimal impact on users, the solution assessment to analyze the functional and business requirements needs to be carried out.
  1. Identify deployed farm solutions in OnPremise environment
  2. Review requirements with business users
  3. Identify unused features, and agreeing with business users to omit this functionality from the new app for SharePoint
  4. For each farm solution, determine whether or how to replace it with an app for SharePoint
Best practices for specific farm solutions

Following best practices are considered when transforming specific solutions

Site templates
  • Recommended to use OOB site templates
  • Minimize branding
  • Use of Site Scripts, Site Design (Modern sites)
Page layouts and Master pages
  • Recommended to use OOB page layouts and master pages
  • Upload new master pages and page layouts to your site collection either manually or by using remote APIs
  • Configure O365 site to use the new page layouts and master pages
Web parts and controls
  • Scan all existing pages to determine which pages have web parts
  • Review out-of-the-box web parts to determine if any can replace custom web part
  • Replace existing web parts with add-in part instances
Site columns, list definitions, and content types
  • For site columns, list definitions, and content types that were created using the Feature framework elements, and deployed using farm solutions, use content migration transformation approach (Sharegate)
  • Use client side APIs to create Site columns, list definitions, and content types
Timer jobs
  • SharePoint Online does not support creating and managing timer jobs
  • Instead, create a console application uses Windows Task Scheduler or an Azure Web Job to schedule and run the console application remotely
Event Receivers
  • Event receivers are created outside of SharePoint inside a web service (Using Azure storage queues and WebJobs for async actions) and are registered with SharePoint
SharePoint Designer Workflows
  • SPD workflows can be migrated to O365 using Sharegate
  • Transform SharePoint Designer workflows to MS Flow

A code migration exercise starts with evaluating the existing customizations on SharePoint OnPremise and maps those to the out of box available possibilities in SharePoint Online. For more complex scenarios in Microsoft Azure, MS Flow can be used effectively with SharePoint. Again keep in mind that, migration is another chance to re-architect your existing solutions.