Hi Fini
My name is Andre Da Costa; an Independent Consultant, Windows Insider MVP and Windows & Devices for IT MVP. I'm here to help you with your problem.
You are probably signed into an account that does not own Minecraft. Try signing out then sign in with the right account.
Option 2:
Issues with playing multiplayer games online may occur if your account's privacy and online safety settings are blocked. Let's try to double check the other options under Privacy and online safety settings by logging in to this link (https://account.xbox.com/en-US/Settings?tab=1) and follow the steps below:
Go to the Xbox One/Windows 10 Online Safety tab.
Set Join multiplayer games to Allow.
You can also change other settings before clicking the Save button.
Play Minecraft again.
To know more about changing the Privacy and Online Safety settings, you may visit this link (https://privacy.microsoft.com/en-us/xbox-one-pr...).
or
Ask a friend to change the settings on Windows 10 PC or Xbox device.
Option 2:
Could you confirm if this also happens in the default Administrator account?
Open Start
Type: cmd
Right click CMD
Click Run as administrator
At the command prompt, type:
net user administrator/active:yes
Hit Enter
Close command prompt, restart, then try signing into the Administrator account.
Still not working?
Open Start > Settings > Apps > Apps & features
Scroll down to Minecraft
Select it
Click Advanced options
Click Reset
Restart
Check the Store for updates
If that does not work...
download the following utility and use it to remove Minecraft: extract it, launch it, scroll through the list, select Minecraft then click Remove.
https://gallery.technet.microsoft.com/scriptcen...
Download and reinstall Minecraft for Windows 10 - Microsoft Store
https://www.microsoft.com/en-us/p/minecraft-for...
I recommend you contact support and let them put you through a tier 2 support so they can investigate your Microsoft Account, because that is likely where the issue lies why you are having issues signing. They will probably as for permission to connect to your machine and investigate the problem.