Annoyingly, Office 365 when coupled with AAD Connect assigns the login name as the AD UPN, but it won’t assign that same UPN as the default email address – instead using firstname.lastname@example.org .This is generally when the ProxyAddresses attribute in AD isn’t populated.
In certain situations it’s not desirable to populate this manually, or to mess with the existing settings.
AAD Connect to the rescue. With AAD Connect we can transform the ProxyAddresses attribute from an existing AD field – the UPN would seem the most sensible.
In Synchronization rules editor, switch the direction tabs to outbound rules.
There is a rule called “UserExchangeOnline”, hit edit and accept the option to disable and clone the rule (this saves it being overwritten at a later date)
Change the precedence to 50 and go to transformations.
Scroll down till you find the Target Attribute of ProxyAddresses.
Change the FlowType to Expressions and enter the following in the source:
And save the rule.
Now on the next sync, the Azure directory will have it’s ProxyAddresses attributes replaced with SMTP:email@example.com (assuming your UPN is the desired email address)