I also had a "we tried to sign you in to your Microsoft account, but something went wrong." problem. Reboots and everything didn't help, neither did changing password etc. Ended up deleting the local data of Minecraft on the PS4 (that works without deleting the levels). After that, I was able to log in again.
Mine worked. What I did:
Change my password (which also told me that it'd merge my Microsoft account with my Skype account, so the account type must be different now somehow)
Removed my authenticator temporarily
With these two changes, linking the accounts worked immediately.
Recommendations that did not work for me:
Rebooting the PlayStation
Logging in via non-mobile web browser
I have this bug too. My Microsoft Account is linked to a Nintendo account, where I've played Minecraft with it on the Switch for months now. It is not linked with a Playstation account.
Steps to reproduce:
Start the game immediately after update
Try to link MS account
Wait for minutes at "Signing in with your Microsoft Account..."
Cancel
See the error above
Try to link MS account again
Immediately see the error above (no waiting time)
Back to 6 a couple of times
Restart Minecraft, try linking
Wait for now 11 minutes at "Signing in with your Microsoft Account..."
I'll keep you posted, it's still waiting
If that is relevant, I'm using the Microsoft Authenticator on Android for two-factor auth. The authenticator always tells me the login was successful, after confirming.
Since I keep editing, it's now 16 minutes at 10. Edit, aborted now after ~25 minutes, and we're back at 6, where the error immediately pops up after logging in.
The issue is still around with 1.16.201.
My kids play on Switch, can connect to each other (Switch to Switch).
We have a realm that everybody can connect to (both Switch and PS4).
When they try to connect to my running world (Switch to PS4), they can.
When I try to connect to them (PS4 to Switch), all I get is "Unable to connect to world." after about half a minute.
I have tried for the PS4: port forwarding to the PS4 what I found might help, resetting all settings (requiring a new MS account login) as well as reinstalling the game, all to no avail.