microsoft / microsoft/dev-tunnels
Missing wamcompat_id_token in WAM case
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 508
- Forks
- 52
- Avg merge
- 20h 6m
- Merged PRs (30d)
- 7
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- csharp
- Domain
- authentication, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100