If you have Microsoft Teams installed on Ubuntu used with a company single sign-on page, you might have problems logging in with your personal Microsoft account.
If you want to clear any login info from Microsoft Teams. doing
apt remove teams or
apt purge teams won’t clear login cache, or company SSO page from the application, as those are stored inside you home folder.
To clear SSO page in Microsoft Teams on Ubuntu you need to remove its configurations files inside your home directory inside
There are two folders related to Microsoft Teams, that get created in your user home folder, which get created when you run Microsoft Teams for the first time.
Those two folders are
Microsoft/Microsoft Teams/ and
Microsoft Teams - Preview/ inside .config folder in your home directory.
Their full paths, if you home folder is
/home/$USER, will be
/home/$USER/.config/Microsoft Teams - Preview/ and
/home/$USER/.config/Microsoft/Microsoft Teams/, if you delete those folder, you will reset Microsoft Teams, as they were just freshly installed and never run before.
TLDR; to reset Microsoft Teams on Ubuntu as they were just freshly installed and remove company SSO page from it, do the following.
rm -rf ~/.config/Microsoft/Microsoft\ Teams/ ~/.config/Microsoft\ Teams\ -\ Preview/
Or if you don’t want to use \ to escape space, put folder names inside quotes.
rm -rf ~/.config/Microsoft/'Microsoft Teams'/ ~/.config/'Microsoft Teams - Preview'/