Minecraft launcher wont connect to internet

minecraft-java-editionminecraft-launcher

when I open the launcher it says I can only play Minecraft offline. When I click the try again button to reconnect it doesn't work. I was trying to buy mc dungeons but that wouldn't even work even after redirecting me. At this point I believe it is a issue with my Microsoft account because I added another account and it connects just fine and I can buy mc or mc dungeons no problem. Is this a launcher issue or a Microsoft account issue and can it be fixed?

Best Answer

This happens to me a lot.
Log out of Minecraft. Open the Minecraft installer, and hit Repair when it is an option.
When it finishes, log back in. Boom! Fixed.