To top right corner of Visual Studio, find box with your name or your initials.
Click on the down arrow after this, the Account Settings.
Now click on "Sign out"
Then restart the Visual Studio and sign back,
After a restart of Visual Studio and signing back in, the error should be gone.
I know it sounds dumb, but this is just a traditional way of solving problems in Microsoft.
Hope it helps :)