It was announced yesterday that the Microsoft Authenticator app on iOS is getting a backup and recovery feature. This means that you'll no longer need to worry about losing your account credentials or getting locked out of accounts whenever you switch to a new phone.
Microsoft says that all backup data is encrypted with a Microsoft account, with the backup data being stored in your iCloud account. The feature will be rolling out first to iOS and is currently in a private preview with beta testers. Microsoft will be rolling the backup and recovery feature out slowly over the next few weeks to all iOS and reminds everyone that you can sign up here to be a beta tester if you're eager to try it out.
To try out backup, you'll need to go to Settings in Microsoft Authenticator turn the toggle switch to ON for Auto backups. And to recover, you can sign in to the same iCloud account and Microsoft account used on your previous device, and click on "Begin Recovery."