Multiple MS Teams Accounts on the Desktop

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:

https://microsoftteams.uservoice.com/forums/555103-public/suggestions/17750851-i-want-to-use-multiple-teams-accounts-at-the-same

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.

Switching between organisations in MS Teams

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:

  1. A folder will be created in your user profile directory for each profile.
  2. 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

23 thoughts on “Multiple MS Teams Accounts on the Desktop

  1. Gyarfas Istvan April 4, 2020 / 03:24

    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”

    • Daniel Šmon April 4, 2020 / 11:41

      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!

  2. Michael April 7, 2020 / 00:55

    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.

  3. Ulrich April 7, 2020 / 23:30

    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

    • Daniel Šmon April 7, 2020 / 23:34

      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

      • Ulrich April 7, 2020 / 23:38

        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

  4. TOM April 8, 2020 / 05:19

    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

    • Daniel Šmon April 8, 2020 / 22:40

      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

  5. Jose Zaldivar April 16, 2020 / 06:06

    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.

    • Daniel Šmon April 16, 2020 / 13:21

      Thanks Jose, good to know. I haven’t had to use files in the different profiles yet so hadn’t noticed. Cheers.

    • Gyarfas Istvan April 16, 2020 / 17:15

      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.

    • Mark Iwankow May 12, 2020 / 05:59

      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

  6. Mirko Guerrini April 19, 2020 / 21:54

    Hi there, does it work on a Mac computer? Thanks for your help.

    • Daniel Šmon April 20, 2020 / 09:48

      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

  7. SS April 29, 2020 / 15:57

    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?

    • Daniel Šmon April 29, 2020 / 19:40

      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

  8. Ravi May 3, 2020 / 22:42

    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

    • Daniel Šmon May 14, 2020 / 11:17

      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

  9. Mady S May 14, 2020 / 01:06

    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!

  10. Daniel Šmon May 14, 2020 / 11:02

    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

  11. Jesus July 7, 2020 / 01:04

    Is there a way to have a different Icon in the taskbar for the second instance?

    • Daniel Šmon July 9, 2020 / 08:51

      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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s