title: Is possible to prevent the domain of the UPN to be changed to the onmicrosoft.com when syncing existing accounts?
body: <p>I have a scenario in which a synchronization is being performed from a local Active Directory to an existing Azure AD through AD Connect. I want to synchronize for example the user on cloud example@domain.com with the user example@domain.local that is on-premises.</p>
  <p>Per Microsoft's official documentation regarding AD Connect states: &quot;If the value of the userPrincipalName attribute doesn't correspond to a verified domain in Azure AD, the synchronization process replaces the suffix with a default .onmicrosoft.com value.&quot;</p>
  <p><a href="https://docs.microsoft.com/en-us/azure/active-directory/hybrid/howto-troubleshoot-upn-changes" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/active-directory/hybrid/howto-troubleshoot-upn-changes</a></p>
  <p>This causes the UPN of the user example@domain.com be renamed to example@domain.onmicrosoft.com and as the Shadow UPN will have example@domain.local. This happens even if I have domain.com as the primary domain. I want to prevent this to happen since it will affect the login of the users.</p>
  <p>So I wanted to know if there is a way to work around this limitation and prevent the change of the UPN or it will be necesary to rename the UPN of the user through PowerShell.</p>
  <p>Thanks in advance.</p>