-
Notifications
You must be signed in to change notification settings - Fork 906
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
User account not received #23286
Comments
We need more info to debug your Azure Active Directory issue. If you could attach your logs to the issue (ensure no private data is in them), it would help us fix the issue much faster.
|
Please share verbose logs from "Azure accounts" output pane or Azure Accounts log file as per details above. You may need to reload ADS to enable verbose logging. |
Thanks for the logs, I'm able to reproduce the error, please follow below steps to mitigate the issue:
These files/creds will be regenerated fresh for you and you should be unblocked. I'll look into making sure the cleanup happens when this situation arises. |
Still nothing after completing the steps.
Microsoft.Data.SqlClient.SqlException (0x80131904): User account not received.
---> System.Exception: User account not received.
at Microsoft.SqlTools.Authentication.Authenticator.GetTokenAsync(AuthenticationParams params, CancellationToken cancellationToken) in /_/src/Microsoft.SqlTools.Authentication/Authenticator.cs:line 110
at Microsoft.SqlTools.Authentication.Sql.AuthenticationProvider.AcquireTokenAsync(SqlAuthenticationParameters parameters) in /_/src/Microsoft.SqlTools.Authentication/Sql/AuthenticationProvider.cs:line 90
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.<>c__DisplayClass147_1.<<GetFedAuthToken>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.GetFedAuthToken(SqlFedAuthInfo fedAuthInfo)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.GetFedAuthToken(SqlFedAuthInfo fedAuthInfo)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OnFedAuthInfo(SqlFedAuthInfo fedAuthInfo)
at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at Microsoft.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool)
at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionFactory.<>c__DisplayClass48_0.<CreateReplaceConnectionContinuation>b__0(Task`1 _)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection.ReliableSqlConnection.<>c__DisplayClass30_0.<<OpenAsync>b__0>d.MoveNext() in /_/src/Microsoft.SqlTools.ManagedBatchParser/ReliableConnection/ReliableSqlConnection.cs:line 313
--- End of stack trace from previous location ---
at Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.TryOpenConnection(ConnectionInfo connectionInfo, ConnectParams connectionParams) in /_/src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionService.cs:line 692
ClientConnectionId:f8d164b1-8a31-493b-909e-6227d3e1cc8d
From: Cheena Malhotra ***@***.***>
Sent: Thursday, June 1, 2023 3:40 PM
To: microsoft/azuredatastudio ***@***.***>
Cc: Daniel Rolfe ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoft/azuredatastudio] User account not received (Issue #23286)
Hi @DoblerDanRolfe<https://github.com/DoblerDanRolfe>
Thanks for the logs, I'm able to reproduce the error, please follow below steps to mitigate the issue:
* Close Azure Data Studio
* Remove the cache files in folder: C:\Users\~\AppData\Roaming\azuredatastudio\Azure Accounts
* Delete these credentials in "Windows Credentials Manager":
* [image] <https://user-images.githubusercontent.com/13396919/242706828-b7851f01-6a08-43fb-bfa8-22800777ca3f.png>
* [image] <https://user-images.githubusercontent.com/13396919/242707106-8c47a3a0-8a9c-4bc3-a346-7d7e8b2b35f7.png>
* Restart Azure Data Studio and refresh credentials as prompted.
These files/creds will be regenerated fresh for you and you should be unblocked. I'll look into making sure the cleanup happens when this situation arises.
—
Reply to this email directly, view it on GitHub<#23286 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BAH7UAGAFFDRCR3XQY3UGJTXJDV23ANCNFSM6AAAAAAYXJLUY4>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
CONFIDENTIALITY NOTE: The information contained in this message and any attachments are privileged and confidential and intended only for the named recipient(s). If you have received this message in error, you are prohibited from reviewing, copying, distributing or using the information. Please contact the sender immediately by return e-mail and delete the original message and attachments. The contents of this e-mail do not necessarily represent the views or policies of or its employees.
|
Can you provide new 'VERBOSE' logs and confirm that the credentials (IV/KEY) are created for you?
|
They were attached to my previous reply, did they not come through?
Those messages are not found in the logs.
From: Cheena Malhotra ***@***.***>
Sent: Thursday, June 1, 2023 3:56 PM
To: microsoft/azuredatastudio ***@***.***>
Cc: Daniel Rolfe ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoft/azuredatastudio] User account not received (Issue #23286)
Can you provide new 'VERBOSE' logs and confirm that the credentials (IV/KEY) are created for you?
You should see these logs if credentials were saved to Credential Manager:
[Information]: FileEncryptionHelper: Successfully saved encryption key accessTokenCache-iv for MSAL persistent cache encryption in system credential store. - []
[Information]: FileEncryptionHelper: Successfully saved encryption key accessTokenCache-key for MSAL persistent cache encryption in system credential store. - []
—
Reply to this email directly, view it on GitHub<#23286 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BAH7UACSLGPKK3H4BY6RMMLXJDXUBANCNFSM6AAAAAAYXJLUY4>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
CONFIDENTIALITY NOTE: The information contained in this message and any attachments are privileged and confidential and intended only for the named recipient(s). If you have received this message in error, you are prohibited from reviewing, copying, distributing or using the information. Please contact the sender immediately by return e-mail and delete the original message and attachments. The contents of this e-mail do not necessarily represent the views or policies of or its employees.
|
FYI I was able to resolve this by rebooting PC – and repeating the steps.
Including fully removing the account from the Connected Accounts Screen.
From: Cheena Malhotra ***@***.***>
Sent: Thursday, June 1, 2023 3:56 PM
To: microsoft/azuredatastudio ***@***.***>
Cc: Daniel Rolfe ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoft/azuredatastudio] User account not received (Issue #23286)
Can you provide new 'VERBOSE' logs and confirm that the credentials (IV/KEY) are created for you?
You should see these logs if credentials were saved to Credential Manager:
[Information]: FileEncryptionHelper: Successfully saved encryption key accessTokenCache-iv for MSAL persistent cache encryption in system credential store. - []
[Information]: FileEncryptionHelper: Successfully saved encryption key accessTokenCache-key for MSAL persistent cache encryption in system credential store. - []
—
Reply to this email directly, view it on GitHub<#23286 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BAH7UACSLGPKK3H4BY6RMMLXJDXUBANCNFSM6AAAAAAYXJLUY4>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
CONFIDENTIALITY NOTE: The information contained in this message and any attachments are privileged and confidential and intended only for the named recipient(s). If you have received this message in error, you are prohibited from reviewing, copying, distributing or using the information. Please contact the sender immediately by return e-mail and delete the original message and attachments. The contents of this e-mail do not necessarily represent the views or policies of or its employees.
|
Closing issue as fix has been merged in Main, will be available in July release! |
These steps resolved the "User account 'foo@bar.com' not found in MSAL cache, please add linked account or refresh account credentialsl." |
Thanks @RyanGDay - looks like this bugfix has already been implemented into main branch and will come out in july release |
Is there a work around for this issue until the July release? |
The first time I tried this it did not resolve the issue. The second time I also ensured that the login page opened in a Chrome window using the "Guest" profile so that it didn't have a cached login and it worked. |
I'm still unable to resolve the issue on Linux, unfortunately. Azure Data Studio Version: 1.44.1 I tried unlinking account from Azure Data Studio, removing directories Any more tips how could I resolve the problem, while waiting for the July release? Stacktrace:
|
Please try clearing token cache with command: |
I am also running 1.44.1 with linux. Clearing the Account token cache did not help. Same error. bye
|
Opened a new issue to investigate (#23688) as it's a different error message and specific to Linux. Please follow the same for updates on this. Is it possible to attach Verbose MSSQL logs on the issue as per instructions in #23688 (comment)? |
@cheenamalhotra I am still receiving this error after trying all the recommendations. I've tried the manual clearing and also using the Azure Accounts: Clear Azure Account token cache. It keeps asking me to sign in and when I do I get the error. |
Hi @tylerberens Could you please capture logs as per comment (restart ADS after enabling setting) and upload them in a new issue for investigation? |
For users on macOS, simply find and toggle (off and back on) the Mssql: Enable Sql Authentication Provider setting. It will clear the cache and resolve the "User account 'foo@bar.com' not found in MSAL cache, please add linked account or refresh account credentials" issue. I was having this issue on 1.45.1 after months of not having accessed a particular server but where my AAD account's password had since changed. |
This quick fix works on Linux too, but I left it disabled and used MFA access. |
Steps to Reproduce:
Microsoft.Data.SqlClient.SqlException (0x80131904): User account not received.
---> System.Exception: User account not received.
at Microsoft.SqlTools.Authentication.Authenticator.GetTokenAsync(AuthenticationParams params, CancellationToken cancellationToken) in //src/Microsoft.SqlTools.Authentication/Authenticator.cs:line 110
at Microsoft.SqlTools.Authentication.Sql.AuthenticationProvider.AcquireTokenAsync(SqlAuthenticationParameters parameters) in //src/Microsoft.SqlTools.Authentication/Sql/AuthenticationProvider.cs:line 90
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.<>c__DisplayClass147_1.<b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.GetFedAuthToken(SqlFedAuthInfo fedAuthInfo)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.GetFedAuthToken(SqlFedAuthInfo fedAuthInfo)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OnFedAuthInfo(SqlFedAuthInfo fedAuthInfo)
at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at Microsoft.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool)
at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionFactory.<>c__DisplayClass48_0.b__0(Task
1 _) at System.Threading.Tasks.ContinuationResultTaskFromResultTask
2.InnerInvoke()at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection.ReliableSqlConnection.<>c__DisplayClass30_0.<b__0>d.MoveNext() in //src/Microsoft.SqlTools.ManagedBatchParser/ReliableConnection/ReliableSqlConnection.cs:line 313
--- End of stack trace from previous location ---
at Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.TryOpenConnection(ConnectionInfo connectionInfo, ConnectParams connectionParams) in //src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionService.cs:line 692
ClientConnectionId:e2c36b21-edfd-45cc-a3cd-6361fa610244
Does this issue occur when all extensions are disabled?: Yes/No
Yes
The text was updated successfully, but these errors were encountered: