This occurs if the user account in your on-premises environment has a proxyaddresses
attribute or mail
attribute that contains one or more of the following special characters:
|'||single quotation mark|
In this scenario, after directory synchronization is run, the special character is replaced by an underscore character. Therefore, the user’s Office 365 email address contains an underscore character instead of the special character.