When Azure AD Connect will first try to match Active Directory accounts to Office 365 accounts, it looks for a Active Directory UserPrincipalName that matches a corresponding Office 365 user name. This is known as a soft-match because it relies on a string comparison.
To ensure the users match between AD and Office 365, you will want to make sure the UPNs align between the two systems. In many AD environments, a domain suffix of LOCAL, CORP or something else that seemed to make sense at the time. Since neither LOCAL or CORP or many other names cannot be registered in Office 365, you will need to update the UPNs of your users. This is an easy task using Cayosoft Administrator.
First, you should nail-down the name you will use in Office 365 as the domain suffix. By default the names will be something like mydomain.onmicrosoft.com, but you will probably wan’t to register you own name so you users will sign in with something like email@example.com.
If you are not using mydomain.com in AD already, you can register it with AD using the Active Directory Domains and Trusts (ADDT) tool.
Once you have update the UPN you can now use Cayosoft Administrator to update the user accounts with the UPNs of your users. The rule, AD Users | Find & Replace UserPrincipalName (UPN) Suffix, (shown below) This rule allows you to specify the domain or OU where you want to update the UPNs, the current domain suffix you need to replace and the new domain suffix the users are to receive. After you fill out the form with the appropriate values, you can click Preview to see a preview of the users the rule will update along with the new UPN the user will receive.