Microsoft Teams Authentication Problems – Workaround PowerShell Script

The Problem

After a Domain Password change, my Teams Desktop Client was stuck in an Authentication Loop. I tried several things for troubleshooting, but the single steps didn’t solve the problem for itself. As a normal User, I would open a Helpdesk Ticket and would wait until they solve the problem for me. But as a System Engineer and Teams Consultant, I should find the problem by myself, I thought. And yes I tried to turn it of and on again and it didn’t help ;-).

BTW: It seems that I’m not alone with this problem because on UserVoice several reported and upvoted it.

The Solution

As a result, I tried all troubleshooting steps together and that finally solved my authentication problems.

  • Make the Internet Explorer Site to Zone Assignments for Microsoft Teams (Trusted Sites)
  • Purge the Microsoft Teams Client Cache Folders
  • Clear the Cached Credentials for Microsoft Teams

Finally, my problem was solved and I did not disturb our Helpdesk Team.

Automated the solution with a PowerShell Script

But the troubleshooting took me an hour and manually deleting multiple entries from Windows Credential Manager is not my favorite job. So I used my spare time on Sunday, Yes I’m a Nerd!, and wrote a PowerShell Script for it.

Feel free to try it out, and comment here in the Blog, or at Twitter @philipp_kohn if you have suggestions for optimizing the Script. Reminder: No Backup no mercy! – Use my Scripts at your own Risk 😀

Philipp Kohn

IT Consultant Specialties: Remote Desktop Services, Office 365, User Profile and Group Policy Management

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.