- Add dev.mydomain.com as an accepted domain to the on-prem Exchange Server:
https://learn.microsoft.com/en-us/exchange/mail-flow/accepted-domains/accepted-domains?view=exchserver-2019 - Add dev.mydomain.com as a domain in 365: https://learn.microsoft.com/en-us/microsoft-365/admin/setup/add-domain?view=o365-worldwide
Set DNS records ( Mx / autodiscover tc.. ) to 365
Create the necessary dev.mydomain.com AD accounts on-prem to sync to 365. add dev.mydomain.com as an allowed UPN:
https://learn.microsoft.com/en-us/microsoft-365/enterprise/prepare-a-non-routable-domain-for-directory-synchronization?view=o365-worldwide#step-1-add-the-new-upn-suffix