Do you have multiple MS Teams accounts? Either across multiple tenants or even just a single account connected to multiple organisations?
I have, and I’ve also been quite frustrated with the inability to stay signed in to each account and easily switch between them.
Turns out a lot of other people have been frustrated by this as well, as this is the number two item on UserVoice for MS Teams right now. So before you continue reading this workaround, head over and add your vote:
For background, Microsoft have made some improvements over the last couple of years, including the ability to switch between orgs using a drop-down list in the top-right of the app. However, this still means you can only have one open at a time, and it is very slow to switch between them, taking many 10s of seconds each time.

The Android and iOS MS Teams apps do have better multi-account support, but still suffer from some of the same problems such as slow switching between accounts. You can also use multiple browser profiles, but that has it’s own limitations.
Now on the Desktop there is a nicer solution thanks to Francois Hill‘s post over at UserVoice.

So how do I use multiple accounts?
I’ve extended on the above comment a little bit to make it easy to re-use. Simply take the following batch script and save it to a text file with the .cmd
extension. E.g. for a “Company” profile you would save it as Company.cmd
. Here’s how it works:
- A folder will be created in your user profile directory for each profile.
- The profile will be stored in your local AppData directory.
The name of the file will be used as the “profile” name. This will create a folder in your When you run the script, a new folder will automatically be created alongside the .cmd
file.
Create as many of these as you like! Once created, simply double click each launch script and a new MS Teams window will open.
@ECHO OFF REM Uses the file name as the profile name SET MSTEAMS_PROFILE=%~n0 ECHO - Using profile "%MSTEAMS_PROFILE%" SET "OLD_USERPROFILE=%USERPROFILE%" SET "USERPROFILE=%LOCALAPPDATA%\Microsoft\Teams\CustomProfiles\%MSTEAMS_PROFILE%" ECHO - Launching MS Teams with profile %MSTEAMS_PROFILE% cd "%OLD_USERPROFILE%\AppData\Local\Microsoft\Teams" "%OLD_USERPROFILE%\AppData\Local\Microsoft\Teams\Update.exe" --processStart "Teams.exe"
Update 4 Apr 2020: Snippet and Gist updated to include extra quotes to support user name with spaces as per Gyarfas’s suggestion.
Also available in the following gist: https://gist.github.com/DanielSmon/cc3fa072857f0272257a5fd451768c3a
Hi Daniel
really cool solution, just a minor “observation” in case that the user profile name has spaces, the script works like this:
@ECHO OFF
REM Uses the file name as the profile name
SET MSTEAMS_PROFILE=%~n0
ECHO – Using profile “%MSTEAMS_PROFILE%”
SET “OLD_USERPROFILE=%USERPROFILE%”
SET “USERPROFILE=%LOCALAPPDATA%\Microsoft\Teams\CustomProfiles\%MSTEAMS_PROFILE%”
ECHO – Launching MS Teams with profile %MSTEAMS_PROFILE%
cd “%OLD_USERPROFILE%\AppData\Local\Microsoft\Teams”
“%OLD_USERPROFILE%\AppData\Local\Microsoft\Teams\Update.exe” –processStart “Teams.exe”
Thanks Gyarfas, as I don’t have spaces in my username I didn’t pick that up. I’ve now updated the Gist and snippet for others. Cheers!
Hello Daniel – This was just what our team needed with the multiple clients we work with. We did find a strange hiccup that if the guest account had an “&” sign the file name wouldn’t translate well into the script.
nice!
Hi Daniel,
I like that approach.
How will it handle login credentials? Do I have to login each time on launching a different Teams profile? If yes, what’s the advantage compared to just log off and on again?
Thank you!
Best regards, Ulrich
Hi Ulrich,
It caches the credentials in each profile the same was as the “original” profile. So when I open all of my profiles after a reboot, they all log in automatically.
The other major benefit is that I can now keep three copies of MS Teams running side-by-side at the same time. So I get full desktop capability (e.g. like video blur), chat, notifications side by side for all of my orgs/accounts.
Hope that helps.
Cheers,
Daniel
Uh! That indeed sounds very promising!
I’ll try that and eventually use all my PCs resources! 🙂
Because as a freelancer I’m usually dealing with up to 5 different Teams accounts at a time.
Thanks again!
Best regards, Ulrich
Hi Daniel,
Thank you for the trick. It works well.
How do you handle the way to join meetings? I cannot choose which account to use to join meetings.
Thanks again.
Regards,
Tom
Hi Tom,
Good point. Yes links will open in the default profile. The way I get around this is usually by switching to the profile/account window I want to use, selecting the “Calendar” icon on the left hand navigation and then joining the meeting from there.
Obviously if the meeting isn’t in any of your calendars then this will not work. But in that case, it may not matter which account/profile you use to join the meeting?
Cheers,
Daniel
Hi Daniel, I tried this and works great. Except that if you try to download from file in a Team, it crashes. I tried to download an PPT, it gives me the prompt to download but then it blows up.
Thanks Jose, good to know. I haven’t had to use files in the different profiles yet so hadn’t noticed. Cheers.
For the downloads to work you should create a second user on your PC, switch account, install / login Teams on that account with the second credentials, and when you would switch Teams, you just switch between accounts.
Make sure that you have a OneDrive running for each instance you’re running in teams.
Without OneDrive running any file actions are going to fail
Hi there, does it work on a Mac computer? Thanks for your help.
Hi Mirko,
Unfortunately this particular solution will only work on Windows. I switched over from macOS a couple of years ago so haven’t had a need to look into an equivalent workaround on macOS.
Cheers, Daniel
Thanks Dan, but looks like i am little lost here. Where can I create the folder and place this batch file? Do I need to update anything in the batch command?
Hi SS, you can save the batch/cmd file anywhere you like, and you don’t need to edit it at all. The way the script works is that it will take the file name (the bit before .cmd) and use that to create a new folder inside your User Profile directory. So you could put your .cmd file on your desktop if you like for easy access.
Cheers,
Daniel
Hi Daniel,
I tried this script and seeing below in cmd but unfortunately Teams is not opening for me also i verified that the custom profile folder is getting created.
– Using profile “Company”
– Launching MS Teams with profile Company
I am running it on Windows. Any help would be highly appreciated.
-Ravi
Hi Ravi, this is a hard one to troubleshoot. But I’d start by trying to run it manually using the original instructions and then move forward from there. You could also try removing your local MS Teams profile folders, but please be careful if you decide to do this.
Other things to consider are if you have any Group Policies applied to your machine.
Hope that helps,
Cheers,
Daniel
Hi, Daniel. Is there any way to undo this?
Unfortunately, I selected the “Apply to all tenants” (or something similar) option, and no matter which file I select, it only opens that first one.
Thanks in advance!
Hi Mady, sorry I haven’t come across that before so not sure off the top of my head. Depending on where that “Apply to all tenants” option is stored, you might try deleting all of your local profile folders, but please be careful and make sure you back them up before hand.
Good luck. Cheers, Danel
Is there a way to have a different Icon in the taskbar for the second instance?
Hi Jesus,
Unfortunately I’m not aware of an easy way of doing this. For example, if you change the shortcut icon, the icon changes back as soon as Teams launches. I haven’t spent much time digging around for a solution, but I suspect this may not be so easy as all instances end up running the same executable.
If anyone has found a way of changing the icon, I’d love to hear it!
Cheers,
Daniel