Migration from On-Premises Infrastructure to Microsoft 365: Strategy and Compliance

July 08, 20263 min read
Office 365CloudExchangeCompliance

Migrating complex local environments to the cloud involves much more than just moving electronic mailboxes or syncing network directories. It requires a robust corporate compliance approach, stable digital identity control, and minimal disruption planning.

In this article, I discuss the methodological steps I followed to migrate corporate local structures to the Microsoft SaaS ecosystem, maintaining alignment with international ISO standards and ITIL best practices.

Migration Phasing

Cutover and hybrid are not the same runbook. In a cutover, the four stages below end in one window: MX changes and the on-premises Exchange goes away. In hybrid, Entra Connect stays, mailboxes move in batches, and MX can remain on-premises for as long as coexistence lasts. Treating both as a single DNS cut leaves mail down in the middle of the move.

  1. Discovery: Mapping active accounts, shared mailbox permissions, email traffic rules, and local storage sizes.
  2. Identity Synchronization: Configuring Microsoft Entra Connect (formerly Azure AD Connect) to synchronize the local Active Directory (AD) with the cloud directory.
  3. Pilot Migration: Transferring technology and leadership users to validate latency, MFA (Multi-Factor Authentication) policies, and mobile applications.
  4. Final Cutover: cutover only. Adjust public DNS records (MX, SPF, DKIM, DMARC) and point the corporate mail flow. In hybrid, this stage is a mailbox batch, not a single MX change.

Compliance and Conformity Assurance

During the transition in regulated companies (such as in the IMS - Integrated Management System of VA Engenharia), data protection and privacy are non-negotiable. We ensured compliance by implementing:

  • Data Retention Policies: Configuring eDiscovery and litigation hold to ensure that historical data was not deleted improperly.
  • Data Loss Prevention (DLP): Automated rules in the cloud to block external sharing of files containing proprietary or strategic engineering information.

A mailbox does not cover the department's files. Network shares moved to SharePoint and OneDrive with Microsoft's migration tool, one batch per area. The owner checks a pilot folder before the share is cut over.

Cutover DNS

Mail flow only moves when MX, SPF, and DKIM point at Microsoft 365. I lower the MX TTL a day or two ahead and, in the cutover window, publish the three together.

example.com.  MX   0  example-com.mail.protection.outlook.com.
example.com.  TXT  "v=spf1 include:spf.protection.outlook.com -all"
selector1._domainkey.example.com.  CNAME  selector1-example-com._domainkey.example.onmicrosoft.com.
selector2._domainkey.example.com.  CNAME  selector2-example-com._domainkey.example.onmicrosoft.com.
dig +short MX example.com
dig +short TXT example.com
dig +short CNAME selector1._domainkey.example.com

The exact value of both DKIM CNAMEs comes from the Microsoft Defender portal (or Get-DkimSigningConfig); copy it from there instead of building it by hand. The SPF TXT replaces the one that already exists. A second v=spf1 record makes both fail. dig has to return the Microsoft MX before the on-premises Exchange is switched off, and that applies to a cutover. In hybrid, the on-premises Exchange stays until the last batch. DMARC (v=DMARC1; p=quarantine) comes after SPF already passes, not in the same minute as the cut.


Conclusion

The migration significantly reduced on-premises server licensing costs and eliminated the need for physical maintenance on internal Exchange servers, bringing scalability and high availability under hybrid cloud governance.

Related Articles