Hi Mark,
Thank you for providing such a detailed overview of your scenario. Your situation is complex but manageable.
Direct Answer to Your Question is if you change the on-premises UPN from @oldcompany.com to @new.onmicrosoft.com (Tenant B) while keeping email in Tenant A (@oldcompany.com):
Email & M365 (Tenant A) Will Continue Working. Email addresses are controlled by the proxyAddresses attribute in Azure AD, not the UPN. Users will still log in to M365 (Tenant A) with @oldcompany.com, but their on-premises login (and Tenant B sync) will use @new.onmicrosoft.com.
Potential Issues could be a authentication confusion. Users may be prompted for @oldcompany.com (M365) vs. @new.onmicrosoft.com (local/on-prem apps).
Conditional Access/SSO Conflicts: If policies in Tenant A enforce UPN matching, hybrid workflows may break.
Licensing/Group Assignments: If scripts or policies rely on UPNs, updates may be needed.
if its possible avoid @onmicrosoft.com UPNs
Instead of using @new.onmicrosoft.com, follow this approach Add a Custom Domain to Tenant B (e.g., @newcompany.com). Register a new public domain (e.g., newcompany.com) and verify it in Tenant B. Set this as the primary UPN suffix in on-prem AD (******@newcompany.com).
Sync to Tenant B with the new UPN (@newcompany.com). Keep @oldcompany.com as an alias (in proxyAddresses) for email in Tenant A.
As Result users log in to:
Tenant A (M365): ******@oldcompany.com (email unchanged).
Tenant B (Hybrid Apps): ******@newcompany.com (clean separation).
No conflicts, no onmicrosoft.com dependencies.
rgds,
Alex
P.S. If my answer help to you, please Accept my answer