Additional sign-in or account-related issues within Microsoft Teams for business
This is clearly an issue with Teams, or possibly Defender (they updated silently, together).
(rant, deleted)
(Next day: not a solution, only a work-around so read on...) I've found a solution -
Open a Terminal session and type this:
rm -r ~/Library/Application\ Support/Microsoft/Teams
And then keep that command in a Notes file. You know...for next time (because you'll need it).
[You also might see a /Library/Application Support/com.microsoft.teams, but that's not the one you need to delete. The one in the Microsoft directory (...it all blends together, mea culpa) is the correct cache file - killing it will introduce you to a newer first-run panel and then you should be able to get it running after that. ]
Now try to reinstall. This should let you into Teams for a while - mine was the next day, after it came out of sleep, it fell back to it's problematic state. I appeared "offline" and restarting the app gave the 2002 error. Running that command allowed me to log back in.
(rant continues)
This is clearly an issue with Teams.
The login panel on restart is the OLD one, while the login panel on killing the support file is the NEW, rounder-edged version. It should only be the new one, so something pointing to an old resource and killing the login process.
At no point should there be something residual in the system once you've cleaned it out. We should all be able to reinstall an app cleanly but Teams periodically seems to just destroy itself or not fully clean out a systems file.