If you are finding difficulties changing your existing Microsoft online resource mailbox to federated resource mailbox , now there is a solution you can change to federated resource . The name for changing that called “AD soft match”
For doing this
We need to create same user account in your on premise active directory as same as cloud (Office 365).
Then you have to set below changes in your AD user properties attribute editor
For example if you want to change office 365 cloud resource user to federated resource user.
“email@example.com” then create in your AD “firstname.lastname@example.org” then go to the attribute editor do the settings
User Properties attribute editor edit the proxy address to SMTP:email@example.com (Primary email address) and
smtp:firstname.lastname@example.org (Secondary email address) and set the email tab in the properties type the email
After doing this run the dir sync command
Now open Office 365 portal and check it this email@example.com on premise user has merge to your existing Office 365 resource account.