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

User account 'x@y.net' not found in MSAL cache, please add linked account or refresh account credentials. #24894

Closed
ackermann81 opened this issue Nov 6, 2023 · 1 comment

Comments

@ackermann81
Copy link

  • Azure Data Studio Version: 1.46.1
  • OS Version: Windows Server 2019 Datacenter 1809 Build 17763.4974

Steps to Reproduce:

I generally can´t logon to our azure sql server by azure data studio. SSMS is working fine. I logon by MFA and can work. As we need profiling for an issue i waned to use the azure data studio. I added the account and on the browser all looks fine but after i return to the studio he brings me Microsoft.Data.SqlClient.SqlException (0x80131904): User account 'x@y.net' not found in MSAL cache, please add linked account or refresh account credentials.
---> System.Exception: User account 'x@y.net' not found in MSAL cache, please add linked account or refresh account credentials.
at Microsoft.SqlTools.Authentication.Authenticator.GetTokenAsync(AuthenticationParams params, CancellationToken cancellationToken) in //src/Microsoft.SqlTools.Authentication/Authenticator.cs:line 129
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()

i already raised log level but don´t know how to fix the issue:
[Information]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Info - getTokenCache called - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Trace - getAllAccounts called - []
[Verbose]: MsalCachePlugin: Cache file for 'MSAL' cache not found on disk: ENOENT - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Trace - Deserializing JSON to in-memory cache - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Trace - Reading cache snapshot from disk - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Trace - Overlaying input cache with the default cache - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Trace - Setting in-memory cache - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Trace - Setting cache key value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Trace - Retrieving all cache keys - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Error]: MSAL: Unable to find account 0ac34b1e-c22f-4392-9822-f6464fb4ba72.aaaaaaaaa-87f1-4d3e-bcc0-1de5d0155045 for removal - []
[Error]: [ClientAuthError] Failed to find account: Error: Unable to find account 0ac34b1e-c22f-4392-9822-f6464fb4ba72.aaaaaaaa-87f1-4d3e-bcc0-1de5d0155045 - []
[Error]: Error when removing token from cache: - [{}]
[Verbose]: Starting login - []
[Information]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Info - getAuthCodeUrl called - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Verbose - initializeRequestScopes called - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : [2afe54a8-c39f-4dc1-aa00-ae91758227f8] : @azure/msal-node@1.16.0 : Verbose - buildOauthClientConfiguration called - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : [2afe54a8-c39f-4dc1-aa00-ae91758227f8] : @azure/msal-node@1.16.0 : Verbose - building oauth client configuration with the authority: https://login.microsoftonline.com/organizations - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : [2afe54a8-c39f-4dc1-aa00-ae91758227f8] : @azure/msal-node@1.16.0 : Verbose - createAuthority called - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Trace - Retrieving all cache keys - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Verbose - Attempting to get cloud discovery metadata in the config - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Verbose - Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the cache. - []
[Verbose]: [Mon, 06 Nov 2023 12:18:47 GMT] : @azure/msal-node@1.16.0 : Verbose - Did not find cloud discovery metadata in the cache... Attempting to get cloud discovery metadata from the network. - []
[Verbose]: [Mon, 06 Nov 2023 12:18:48 GMT] : @azure/msal-node@1.16.0 : Verbose - Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request. - []
[Verbose]: [Mon, 06 Nov 2023 12:18:48 GMT] : @azure/msal-node@1.16.0 : Verbose - cloud discovery metadata was successfully returned from getCloudDiscoveryMetadataFromNetwork() - []
[Verbose]: [Mon, 06 Nov 2023 12:18:48 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:48 GMT] : @azure/msal-node@1.16.0 : Trace - Setting cache key value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:48 GMT] : [2afe54a8-c39f-4dc1-aa00-ae91758227f8] : @azure/msal-node@1.16.0 : Verbose - Auth code client created - []
[Verbose]: [Mon, 06 Nov 2023 12:18:48 GMT] : [2afe54a8-c39f-4dc1-aa00-ae91758227f8] : @azure/msal-common@11.0.0 : Verbose - createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints - []
[Information]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Info - acquireTokenByCode called - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Verbose - initializeRequestScopes called - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : [bd4b2ec7-3425-454b-bad1-42b08acc6002] : @azure/msal-node@1.16.0 : Verbose - buildOauthClientConfiguration called - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : [bd4b2ec7-3425-454b-bad1-42b08acc6002] : @azure/msal-node@1.16.0 : Verbose - building oauth client configuration with the authority: https://login.microsoftonline.com/organizations - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : [bd4b2ec7-3425-454b-bad1-42b08acc6002] : @azure/msal-node@1.16.0 : Verbose - createAuthority called - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Retrieving all cache keys - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Verbose - Attempting to get cloud discovery metadata in the config - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Verbose - Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the cache. - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Verbose - Found metadata in the cache. - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Setting cache key value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : [bd4b2ec7-3425-454b-bad1-42b08acc6002] : @azure/msal-node@1.16.0 : Verbose - Auth code client created - []
[Information]: [Mon, 06 Nov 2023 12:18:50 GMT] : [bd4b2ec7-3425-454b-bad1-42b08acc6002] : @azure/msal-common@11.0.0 : Info - in acquireToken call in auth-code client - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : [bd4b2ec7-3425-454b-bad1-42b08acc6002] : @azure/msal-common@11.0.0 : Verbose - Persistence enabled, calling beforeCacheAccess - []
[Verbose]: MsalCachePlugin: Cache file for 'MSAL' cache not found on disk: ENOENT - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Deserializing JSON to in-memory cache - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Reading cache snapshot from disk - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Overlaying input cache with the default cache - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Setting in-memory cache - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Setting cache key value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Setting cache key value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Setting cache key value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Retrieving all cache keys - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Retrieving all cache keys - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Setting cache key value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Setting cache key value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : [bd4b2ec7-3425-454b-bad1-42b08acc6002] : @azure/msal-common@11.0.0 : Verbose - Persistence enabled, calling afterCacheAccess - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Serializing in-memory cache - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting in-memory cache - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Getting cache key-value store - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Reading cache snapshot from disk - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Merging in-memory cache with cache snapshot - []
[Verbose]: [Mon, 06 Nov 2023 12:18:50 GMT] : @azure/msal-node@1.16.0 : Trace - Remove updated entries in cache - []
[Verbose]: Fetching tenants with uri: https://management.azure.com/tenants?api-version=2019-11-01 - []
[Verbose]: Tenants: LPANET - []
[Verbose]: Filtered Tenants: LPANET - []
[Verbose]: Token Claims acccount: x@y.net, TID: aaaaaaaa-87f1-4d3e-bcc0-1de5d0155045 - []
[Verbose]: Tenant ID: aaaaaaa-87f1-4d3e-bcc0-1de5d0155045, Tenant Name: LPANET - []
[Information]: Could not fetch access token from cache: SyntaxError: Expected property name or '}' in JSON at position 12, fetching new access token instead. - []

Does this issue occur when all extensions are disabled?: Yes/No

@cheenamalhotra
Copy link
Member

Closing as duplicate of #24104, please refer to the comment for mitigation steps. Thanks!

@cheenamalhotra cheenamalhotra closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants