microsoft / microsoft/ado-codespaces-auth

Infinite loop when signing in via Microsoft account in VS Code on Mac

Open
#31 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
10
Forks
8
Avg merge
8h 55m
Merged PRs (30d)
2

Description

Some of the users of tmp-codespaces are experiencing an issue where Azure DevOps Codespaces authentication fails in VS Code (Mac), causing an infinite sign-in loop when using Microsoft account login.

Steps to reproduce:

  1. Open a Codespace in VS Code desktop on Mac.
  2. When prompted, choose to sign in with Microsoft.
  3. Select the account in the company portal (multiple accounts may be shown).
  4. The authentication process loops indefinitely and never completes (VS Code keeps asking for credentials).

Observed Behavior:

  • Authentication works in browser-based Codespaces, but not through the VS Code desktop app.
  • Multiple Microsoft accounts (work, guest, etc.) are shown in the company portal, making it easy to choose an incorrect account and triggering sign-in failures.
  • Azure CLI (az login) may succeed only for the default tenant, but errors (AADSTS53003, AADSTS50079, AADSTS50076) are reported for blocked tenants or ones requiring MFA.
  • Selecting the correct subscription/tenant does not resolve the looping sign-in, and VS Code remains unauthenticated (asks for username).
  • Clearing browser cache & VS Code accounts, and reinstalling VS Code, do not help.

Troubleshooting attempts:

  • Signed out of all accounts in VS Code and browser.
  • Tried incognito mode and a fresh VS Code installation.
  • Azure CLI authentication only works for some tenants; blocked by policy or MFA for others.

Request:

  • Please advise on how to resolve or work around this infinite authentication loop in VS Code.
  • Is there a recommended method to ensure authentication only targets a specific tenant (the default one)?
  • Are there upcoming fixes planned for this bug?

Thank you!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by reproducing the Microsoft-account sign-in loop in VS Code desktop on Mac, then compare it with browser Codespaces and Azure CLI login behavior for the affected tenants. Done would require a confirmed resolution or documented workaround for tenant selection and the looping authentication flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript, vscode
Domain
authentication, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.