Forum Discussion

atunellRTG's avatar
atunellRTG
Copper Contributor
Apr 27, 2020
Solved

Microsoft Teams Desktop on Mac Stuck in Login Loop

I recently changed from one MS Office 365 email/organization to another.  I've removed the "old" Office 365 account from everywhere I can find on my Mac, but when I launch Microsoft Teams - every time - it asks me to login with my "old" email address.  When I click sign in under a different account, it goes through - but Microsoft Teams just gets stuck in the same loop.  How can I fix this so I can use the desktop app with my new email/organization?

  • Heiko1410's avatar
    Heiko1410
    May 01, 2020

    atunellRTG

    I’ve got this login loop after I logged in with me private MS account in Teams. I stucken in a login loop when I tried to log with my company account in Teams. Close your Teams application and go to $HOME//Library/Application Support/Microsoft/Teams in files browser and delete/move the Teams folder to Teams_old for example.

     

    Start your Teams application, the Teams folder will created and the Login window appears.

     

    For me it works, when I delete the $HOME//Library/Application Support/Microsoft/Teams folder after I was logged in with me private MS account.

     

    Heiko

66 Replies

  • JGroob's avatar
    JGroob
    Copper Contributor
    I FIXED IT!

    I use outlook for my new organization. I created a teams meeting in my outlook calendar. I made sure Teams was closed on my mac. I think clicked to "join the teams meeting" from outlook and it prompted Teams to open. It had a mild window flicker freak out but it then prompted me to "join the meeting" and before clicking "join" in the pop up box I saw it had an option to "sign in," I clicked that and it then brought me back to the full organizational sign in and I was able to sign in with my new org. I tried so many things to try but this was the only think that kicked it out of the old org sign in window.
  • jcquokka88's avatar
    jcquokka88
    Copper Contributor
    I got stuck in this situation and, to fix, I removed the Teams folder from Application Support. This worked but after some days, the same thing happens - I've probably deleted my Teams folder a dozen times now over the last few months. What I can't fathom is where Teams is getting my old account name from (on first launch after deleting the Teams folder from Application Support, the bad old account is always shown at the top of the list under "Pick an account to continue"). After reading these posts I attempted removing the Identities Cache from Keychain Access but it won't delete. I'm on MacOS Sonoma 14.1 (though the problem started when I was on Ventura - OS upgrade clearly hasn't helped either).
  • Peter Wake's avatar
    Peter Wake
    Copper Contributor

    For anyone else with this issue, this worked for me and was super quick:

    1. Stop Teams (even better, reboot your Mac!)
    2. Open the `terminal` application on your Mac (click Launchpad then type term, hit Enter)
    3. Change to the Teams directory - e.g. cd ~/Library/Application\ Support/Microsoft/Teams
    4. To find files that mention your 'bad' email address (note there is a dot at the end of this command!): grep -r 'mypersonalemail@eghotmail.com' .
    5. For me, this gave desktop-config.json and storage.json
    6. Run rm desktop-config.json and then rm storage.json

    Now when I restarted Teams, it asked me which of the two accounts on my Mac I wanted to use - my personal one or my business one.

    • seanwang's avatar
      seanwang
      Copper Contributor
      Thank you so much. I have been bugged by this for a year. Finally solved!
    • acbcAdmin's avatar
      acbcAdmin
      Copper Contributor
      Hi Peter,
      I wonder if you could help me please. When I tried your steps, there was no Teams folder. There was another folder, which included the Teams keyword, which I deleted (not sure if this was wise or not).

      Secondly, ran the commands that you prescribe. I got desktop-config.json and storage.json in the results. I then ran rm desktop-config.json and then rm storage.json commands. After this ran many lines of code in the Terminal console and came to an end, I still had the login loop issue (a pop login pop up to my legacy account). I also tried rebooting my Mac, but it still didn't resolve the issue.

      Is there something I'm missing or is there something else you could recommend?
      Thanks in advance
      acbcAdmin
    • HieuTr0508's avatar
      HieuTr0508
      Copper Contributor
      It's very helpful
      It's work for me
      Thank you so muchhhhhh
  • ARBattase's avatar
    ARBattase
    Copper Contributor
    Referred following link and the issue seems to resolved for good for me.
    https://www.uvm.edu/it/kb/article/clearing-teams-cache/

    Its a 5 step process:
    1. Fully close Microsoft Teams.
    2. Copy and paste the following into the Go to Folder box, then click Go:
    ~/Library/Application Support/Microsoft
    3. Right click the Teams folder, then click Move to Trash.
    4. Using Spotlight Search (accessed by clicking the magnifying glass on the macOS menu bar), enter “Keychain” and select Keychain Access. Search for Microsoft Teams keys in keychain. Within Keychain, search for “Microsoft Teams” to find the Microsoft Teams Identities Cache entry. Right (two finger) click this item and select the delete option, then close the Keychain Access app.
    5. Relaunch Microsoft Teams. You should now be prompted to sign back into Teams.
    • wendimalley's avatar
      wendimalley
      Copper Contributor
      Just encountered this same loop of never ending login prompts. I followed the steps above and the issue has resolved itself. Thank ARBattase, thank you for sharing.
    • joeacker's avatar
      joeacker
      Copper Contributor
      This worked for me - thanks! I was getting very frustrated and removed as many cache files and keychain entries as I could find - but it wasn't until I deleted that Microsoft Application Support file that I could finally close TEAMS and login with a new username. Thanks!
    • Jonathan_Starr's avatar
      Jonathan_Starr
      Copper Contributor

      Thanks very much! The tip about deleting the folder ~/..../Teams solved the problem for me!  Of course, the infinite loop where you cannot enter a different account is a Teams bug, which Microsoft should have fixed already.

  • Heretohelp's avatar
    Heretohelp
    Copper Contributor

    For all those who weren't able to login using the above recommendations, I followed the below steps and worked for me:

     

    1 - I signed in to my personal Microsoft account using teams for iOS

    2 - I restarted teams from my Mac desktop app 

    3 - Then it auto logged in without getting stuck in the login loop 

     

    Hope it works for you 🙂 

  • CMPx92's avatar
    CMPx92
    Copper Contributor

    atunellRTG Clearing all Teams items from keychain and then restarting the Mac fixed for me, after restart it prompted with the correct login box! 

  • atunellRTG I got same issue that Teams on Mac stuck in login loop. It turns out the root cause is my certification - I reinstalled my mac without changing my computer name. After that, I use my org's MDM tool to enroll my Mac but failed but I didn't noticed that. So I keep got that login loop issue.

     

    For my case, the solution is simple - I removed my Mac registered in MDM portal with old computer name. Rename the computer and re-enroll the Mac. Once done, I can login Teams without any issues then.

     

    Hope it helps for your case.

Resources