Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] WAM Error - Account has previously been signed out of this application. #4977

Open
markjercoates opened this issue Oct 24, 2024 · 1 comment
Labels
needs attention Delete label after triage public-client untriaged Do not delete. Needed for Automation

Comments

@markjercoates
Copy link

markjercoates commented Oct 24, 2024

Library version used

n/a

.NET version

Microsoft Visual Studio Community 2022 (64-bit) - Current
Version 17.11.5

Scenario

PublicClient

Is this a new or an existing app?

None

Issue description and reproduction steps

Using: Microsoft Visual Studio Community 2022 (64-bit) - Current - Version 17.11.5
Cannot sign into Visual Studio getting the following error:
WAM Error
Error Code: 0
Error Message: Account has previously been signed out of this application.
Internal Error Code: 540940121

Relevant code snippets

** LogFile**

0/24/2024 08:07:28 GMT Standard Time : Error : There was a problem executing interactive flow error: 'MSAL.NetCore.4.61.3.0.MsalUiRequiredException:
	ErrorCode: failed_to_acquire_token_silently_from_broker
Microsoft.Identity.Client.MsalUiRequiredException: WAM Error  
 Error Code: 0 
 Error Message: Account has previously been signed out of this application. 
 Internal Error Code: 540940121 

   at Microsoft.Identity.Client.Internal.Requests.Silent.SilentRequest.ExecuteAsync(CancellationToken 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 codeBlock)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
   at Microsoft.Identity.Client.ApiConfig.Executors.ClientApplicationBaseExecutor.ExecuteAsync(AcquireTokenCommonParameters commonParameters, AcquireTokenSilentParameters silentParameters, CancellationToken cancellationToken)
   at Microsoft.Developer.IdentityService.AccountProvider.MsalNetworkServicesImpl.ExecuteInteractiveFlowAsync(IGetTokenInteractiveContext getTokenContext, AuthenticationFlowType authenticationFlowType, CancellationToken cancellationToken)
	StatusCode: 0 
	ResponseBody:  
	Headers: '
10/24/2024 08:07:28 GMT Standard Time : Error : There was a problem getting the access token using the prompt with UI flow. Error: 'MSAL.NetCore.4.61.3.0.MsalUiRequiredException:
	ErrorCode: failed_to_acquire_token_silently_from_broker
Microsoft.Identity.Client.MsalUiRequiredException: WAM Error  
 Error Code: 0 
 Error Message: Account has previously been signed out of this application. 
 Internal Error Code: 540940121 

   at Microsoft.Identity.Client.Internal.Requests.Silent.SilentRequest.ExecuteAsync(CancellationToken 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 codeBlock)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
   at Microsoft.Identity.Client.ApiConfig.Executors.ClientApplicationBaseExecutor.ExecuteAsync(AcquireTokenCommonParameters commonParameters, AcquireTokenSilentParameters silentParameters, CancellationToken cancellationToken)
   at Microsoft.Developer.IdentityService.AccountProvider.MsalNetworkServicesImpl.ExecuteInteractiveFlowAsync(IGetTokenInteractiveContext getTokenContext, AuthenticationFlowType authenticationFlowType, CancellationToken cancellationToken)
   at Microsoft.Developer.IdentityService.AccountProvider.MsalNetworkServicesImpl.ExecuteInteractiveFlowAsync(IGetTokenInteractiveContext getTokenContext, AuthenticationFlowType authenticationFlowType, CancellationToken cancellationToken)
   at Microsoft.Developer.IdentityService.AccountProvider.AadAccountProviderNetworkServicesBase.AcquireTokenWithPromptInternalAsync(String resource, String tenant, UserIdentifier userId, String queryParameters, AuthenticationFlowType authenticationFlowType, Dictionary`2 additionalAuthProperties, CancellationToken cancellationToken)
	StatusCode: 0 
	ResponseBody:  
	Headers: '
10/24/2024 08:07:28 GMT Standard Time : Error : CreateAccount: Creating an account. QueryParameters 'site_id=501454&display=popup&nux=1'
Account creation failed. 
Error: 'MSAL.NetCore.4.61.3.0.MsalUiRequiredException:
	ErrorCode: failed_to_acquire_token_silently_from_broker
Microsoft.Identity.Client.MsalUiRequiredException: WAM Error  
 Error Code: 0 
 Error Message: Account has previously been signed out of this application. 
 Internal Error Code: 540940121 

   at Microsoft.Identity.Client.Internal.Requests.Silent.SilentRequest.ExecuteAsync(CancellationToken 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 codeBlock)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
   at Microsoft.Identity.Client.ApiConfig.Executors.ClientApplicationBaseExecutor.ExecuteAsync(AcquireTokenCommonParameters commonParameters, AcquireTokenSilentParameters silentParameters, CancellationToken cancellationToken)
   at Microsoft.Developer.IdentityService.AccountProvider.MsalNetworkServicesImpl.ExecuteInteractiveFlowAsync(IGetTokenInteractiveContext getTokenContext, AuthenticationFlowType authenticationFlowType, CancellationToken cancellationToken)
   at Microsoft.Developer.IdentityService.AccountProvider.MsalNetworkServicesImpl.ExecuteInteractiveFlowAsync(IGetTokenInteractiveContext getTokenContext, AuthenticationFlowType authenticationFlowType, CancellationToken cancellationToken)
   at Microsoft.Developer.IdentityService.AccountProvider.AadAccountProviderNetworkServicesBase.AcquireTokenWithPromptInternalAsync(String resource, String tenant, UserIdentifier userId, String queryParameters, AuthenticationFlowType authenticationFlowType, Dictionary`2 additionalAuthProperties, CancellationToken cancellationToken)
   at Microsoft.Developer.IdentityService.AccountProvider.AadAccountProviderService.CreateAccountInnerAsync(String userName, String queryParameters, AuthenticationFlowType authenticationFlowType, Dictionary`2 additionalAuthProperties, Boolean homeTenantOnly, CancellationToken cancellationToken)
	StatusCode: 0 
	ResponseBody:  
	Headers: '

Expected behavior

No response

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

No response

@markjercoates markjercoates added needs attention Delete label after triage untriaged Do not delete. Needed for Automation labels Oct 24, 2024
@gladjohn gladjohn changed the title [Bug] [Bug] WAM Error - Account has previously been signed out of this application. Oct 24, 2024
@markjercoates
Copy link
Author

markjercoates commented Oct 24, 2024

I should add that I've tried clearing out my browser cache (Internet Edge), running a repair on my Visual Studio installation, deleting all files in the AppData\Local\.IdentityService directory and doing multiple machine restarts - without success. The error keeps appearing. I do not have any third party Virus programs running on my machine (Windows 11).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs attention Delete label after triage public-client untriaged Do not delete. Needed for Automation
Projects
None yet
Development

No branches or pull requests

2 participants