Skip to guide

Dev Tunnels login not working: browser and device-code checks

Dev Tunnels login not working?

If the CLI can’t open a browser or sign-in never finishes, use device-code login: devtunnel user login -d, or devtunnel user login -g -d for GitHub. Then run devtunnel user show to confirm which account is signed in.

Where does Dev Tunnels login fail?

Identify whether the CLI cannot open a browser, the provider refuses sign-in, or the browser finishes but the CLI never completes. Record the CLI and operating-system versions. A May 2026 public report describes a PlatformNotSupportedException during interactive login on macOS; it does not establish a universal current failure.

How can I sign in without a local browser?

Microsoft documents devtunnel user login -d for Microsoft personal or organization accounts when local interactive browser login is not possible. For GitHub, use devtunnel user login -g -d.

Follow the verification address and code printed by your own CLI in a browser you control. Do not share the code or approve a challenge you did not initiate. Device-code login still follows organization policies, MFA and consent requirements; it does not bypass them.

How do I check the account being used?

Run devtunnel user show to inspect the current login status and confirm the provider and account match the tunnel you intend to manage. If you deliberately need another account, devtunnel user logout clears the cached CLI token before a new sign-in.

Microsoft notes that CLI logout does not clear browser cookies. Choose the intended browser account too. Remove tokens and private addresses from diagnostics before sharing them; do not delete unrelated credentials as a first troubleshooting step.

Why do visitors still need to sign in?

CLI login authorizes the host account; it does not make the tunnel anonymous. Dev Tunnels are private by default. Review visitor access separately from your app authentication, especially for webhook senders that cannot complete an interactive sign-in.

Only expose anonymous access when appropriate for the app, and retain application authorization and webhook-signature validation. VS Code Remote Tunnels has its own sign-in and callback path; a VS Code handoff problem does not prove the devtunnel CLI has the same fault.

Can Groundhog support my local HTTP workflow?

Groundhog offers a named public HTTPS address through its CLI or Aspire integration. Its CLI uses browser-approved device login, so hosted account sign-in still needs to work.

Groundhog is free and best effort with workspace and shared-service limits. It is not an organization-policy workaround or a replacement for the VS Code remote-editor experience. Verify the local app and update webhook or OAuth callbacks if you change services.

Sources

Sources reviewed . Provider behavior and limits can change.

Try Groundhog for your local HTTP app

Use a named public HTTPS address with the CLI or Aspire. There’s no monthly data cap; per-minute and concurrent-request limits apply.