How to fix Microsoft Teams web client stuck in a login loop

The last couple of days, I experienced the Microsoft Teams web client to be stuck in a login loop, when trying to sign into Microsoft Teams in Microsoft Edge and the site continually loops, and I am not able to sign in.

Microsoft Teams web client login error

Turns out there is a solution (and most likely required if you use any security baselines settings…), and for me, it turns out the issues has arisen over night, however the course of the issues wasn’t new, but Microsoft Edge version 99.x was.

I have decided to Block third-party cookies, and for some reason, turns out the Microsoft Teams web client Indeed require these cookies.

Manage and delete cookies and site data

To resolve the issue, you must navigate to the Microsoft Edge Settings window, select Cookies, and site permissions > Cookies and data stored > Manage and delete cookies and site data.

Turn on Allow sites to save and read cookie data (recommended), and make sure that Block third-party cookies is turned off.

However, if you like me, have configured this using Microsoft Endpoint Manager and whish to keep third-party cookies blocked, you’ll have to add the following sites to the Allow list:

  • [*.]microsoft.com
  • [*.]microsoftonline.com
  • [*.]teams.skype.com
  • [*.]teams.microsoft.com
  • [*.]sfbassets.com
  • [*.]skypeforbusiness.com

If you want to add these settings using Microsoft Endpoint Manager, these settings can be configured using the Microsoft Edge “Allow cookies on specific sites” policy.

Microsoft Edge “Allow cookies on specific sites” policy.

More information https://docs.microsoft.com/en-us/microsoftteams/troubleshoot/teams-sign-in/sign-in-loop

–Jesper

How to launch the Windows Settings app directly from the Command line

The Windows Settings app is the entry point for everyday maintenance, configuration, and setup, and can be easily opened with Win + I keyboard shortcut, by clicking on the Settings icon in the Start Menu or Notification Center or by searching for it in the Windows Start Menu.

However, now, and then I need to ease the access to a particular Windows Settings page directly, and this can be easily achieved from either the Run dialog box, the Command Prompt, or using PowerShell. Access to a particular Windows Settings page is possible using URIs (Uniform Resource Identifier) which are unique references to identify specific pages in the Windows Settings app.

Open Windows Settings App from Run dialog box

  1. Open the Run dialog box by pressing Win+R.
  2. Type: “ms-settings:” without the outer quotes, and press Enter to open Windows Settings

To open a specific section of the Windows Settings app type the target URI at the end of the above command and press enter. If you want to open the Windows Update section, open Windows Settings App from Run Dialog Box

  1. Open the Run dialog box by pressing Win+R
  2. Type: “ms-settings:windowsupdate” without the outer quotes, and press Enter to open Windows Settings

You can use ms-settings: URI scheme to launch the Windows Settings app to specific settings pages.

Launch the Windows Settings app directly from the Command line

From a Command Prompt, or scripts, simple call the ms-settings: URI using Start.

Type: “start “” ms-settings:” without the outer quotes, and press Enter to open Windows Settings.

To open the Windows Settings -> Privacy & Security -> Microphone, type:

Type: “start “” ms-settings:” without the outer quotes, and press Enter to open Windows Settings.

A similar experience from within a PowerShell script can be easily achieved by calling the Start-Process cmdlet.

Type: Start-Process -FilePath “ms-settings:”, and press Enter to open Windows Settings.

To open the Windows Settings -> Privacy & Security -> Microphone.

Type: Start-Process -FilePath “ms-settings:privacy-microphone”, and press Enter to open Windows Settings.

More information

To learn more about the Windows Settings URI schema, visit ms-settings: URI scheme reference guide.

–Jesper