Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Missing wamcompat_id_token in WAM case

Open
#522 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp

Research direction

Reproduce the failure with devtunnel user login using an account with an active Azure Subscription, then start at src/Tunnel/Src/CLI/Authentication/UserManager.cs:560 and follow the callers at UserManager.cs:271 and Commands/UserCommands.cs:123. Trace the WAM/MSAL response handling to identify why the token is missing; done means this login path completes without the reported exception.

Written by the indexing model from the issue text.

Description

When I try to login with devtunnel user login, and select an account who has an active Azure Subscription, I got the error below.

Running version

devtunnel --version
Tunnel CLI version: 1.0.1401+3d725ee539

Tunnel service URI        : https://global.rel.tunnels.api.visualstudio.com/
Tunnel service version    : 1.0.1427.13095 (2733b94cde; 2025-04-02 01:00:45Z)
Tunnel service cluster    : usw2
MSAL: [RuntimeBroker] unknown_broker_error Unknown Status: Unexpected
Context: Missing wamcompat_id_token in WAM case
Tag: 0x20714047 (error code 0) (internal error code 544292935)
MSAL: Exception type: Microsoft.Identity.Client.MsalServiceException
, ErrorCode: unknown_broker_error
HTTP StatusCode 0
CorrelationId abecfb39-1e47-4ff0-a8e5-75d3bd1bbd9b
To see full exception details, enable PII Logging. See https://aka.ms/msal-net-logging
   at Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.WamAdapters.HandleResponse(AuthResult authResult, AuthenticationRequestParameters authenticationRequestParameters, ILoggerAdapter logger, String errorMessage)
   at Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.RuntimeBroker.SignInInteractivelyAsync(AuthenticationRequestParameters authenticationRequestParameters)
   at Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.RuntimeBroker.AcquireTokenInteractiveAsync(AuthenticationRequestParameters authenticationRequestParameters, AcquireTokenInteractiveParameters acquireTokenInteractiveParameters)
   at Microsoft.Identity.Client.Internal.Broker.BrokerInteractiveRequestComponent.FetchTokensAsync(CancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.FetchTokensFromBrokerAsync(String, CancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.GetTokenResponseAsync(CancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.ExecuteAsync(CancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.<>c__DisplayClass11_1.<<RunAsync>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.Identity.Client.Utils.StopwatchService.MeasureCodeBlockAsync(Func`1)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken )

Unhandled exception: MSAL.NetCore.4.61.3.0.MsalServiceException:
        ErrorCode: unknown_broker_error
Microsoft.Identity.Client.MsalServiceException: Unknown Status: Unexpected
Context: Missing wamcompat_id_token in WAM case
Tag: 0x20714047 (error code 0) (internal error code 544292935)
   at Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.WamAdapters.HandleResponse(AuthResult authResult, AuthenticationRequestParameters authenticationRequestParameters, ILoggerAdapter logger, String errorMessage)
   at Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.RuntimeBroker.SignInInteractivelyAsync(AuthenticationRequestParameters authenticationRequestParameters)
   at Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.RuntimeBroker.AcquireTokenInteractiveAsync(AuthenticationRequestParameters authenticationRequestParameters, AcquireTokenInteractiveParameters acquireTokenInteractiveParameters)
   at Microsoft.Identity.Client.Internal.Broker.BrokerInteractiveRequestComponent.FetchTokensAsync(CancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.FetchTokensFromBrokerAsync(String, CancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.GetTokenResponseAsync(CancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.ExecuteAsync(CancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.<>c__DisplayClass11_1.<<RunAsync>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.Identity.Client.Utils.StopwatchService.MeasureCodeBlockAsync(Func`1)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken )
   at Microsoft.Identity.Client.ApiConfig.Executors.PublicClientExecutor.ExecuteAsync(AcquireTokenCommonParameters, AcquireTokenInteractiveParameters, CancellationToken)
   at Microsoft.DevTunnels.Cli.Authentication.UserManager.LoginAadUserAsync(LoginOptions options, DeviceCodeCallback deviceCodeCallback, CancellationToken cancellation) in /__w/1/s/src/Tunnel/Src/CLI/Authentication/UserManager.cs:line 560
   at Microsoft.DevTunnels.Cli.Authentication.UserManager.LoginAsync(LoginOptions options, DeviceCodeCallback deviceCodeCallback, CancellationToken cancellation) in /__w/1/s/src/Tunnel/Src/CLI/Authentication/UserManager.cs:line 271
   at Microsoft.DevTunnels.Cli.Commands.UserCommands.LoginAsync(LoginOptions options, CancellationToken cancellation) in /__w/1/s/src/Tunnel/Src/CLI/Commands/UserCommands.cs:line 123
Dominant language
C#
Stars
515
Forks
54
Avg merge
1h 52m
Merged PRs (30d)
1

Getting set up

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.

More from microsoft/dev-tunnels

All issues in microsoft/dev-tunnels

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.