If you receive the Minecraft error on your device then, log out of your Microsoft account on all devices and restart the Minecraft game then again login into the account. If restarting games doesn't work, then adjust the privacy settings of your Microsoft on Xbox, PC, PlayStation, and Nintendo by visiting https://account.xbox.com/settings. And also allow these functions to fix the error - 

1. Communication with "Friends" or "Everybody".

2. Multiplayer gaming

3. Join an Xbox club.

 

For more read visit here - https://webslosh.com/what-is-aka-ms-account-settings-how-to-fix-error/