Skip to content

az login does not open browser automatically on WSL2 #33092

@rootd4ddy

Description

@rootd4ddy

Describe the bug

Running az login on WSL2 (Ubuntu 22.04) does not open the browser. It just hangs without any output or URL to manually navigate to.

$ az login

No browser opens, no URL displayed, command hangs indefinitely.

Environment

  • Azure CLI: 2.67.0
  • OS: WSL2 Ubuntu 22.04 on Windows 11
  • Python: 3.10.12

Steps to reproduce

  1. Install Azure CLI on WSL2
  2. Run az login
  3. Wait - browser never opens

Expected behavior

Browser should open automatically for interactive login, or a device code URL should be displayed.

Workaround attempted

Tried az login --use-device-code which works, but default az login should work too.

Metadata

Metadata

Assignees

Labels

Accountaz login/accountAuto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamLoginPossible-SolutionSimilar-Issueact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions