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.
“firstname.lastname@example.org” then create in your AD “email@example.com” then go to the attribute editor do the settings
User Properties attribute editor edit the proxy address to SMTP:firstname.lastname@example.org (Primary email address) and
smtp:email@example.com (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 firstname.lastname@example.org on premise user has merge to your existing Office 365 resource account.