-
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
Cant Add Account 1.41.1 and 1.41.2 #22227
Comments
@cheenamalhotra It's currently set to MSAL (when i try with this setting i get the error above). When i toggled to ADAP it opened chrome and then locked up waiting https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&response_mode=query&client_id=removed&redirect_uri=http%3A%2F%2Flocalhost%3A49783%2Fredirect&state=49783%2CcGt742e0w%252BjfKr2Owo619Q%253D%253D&prompt=select_account&code_challenge_method=S256&code_challenge=removed&resource=https%3A%2F%2Fmanagement.core.windows.net%2F |
It may not be set in the settings.json as it's default. Please try adding explicitly by opening settings.json:
Are you in proxy enabled env by any chance? If yes, you may want to configure proxy in http.proxy setting: "http.proxy": "https://userName@fqdn:[email protected]:8080" |
@cheenamalhotra I'm not in a proxy enabled environment. I edited
I did check with my colleagues. They are all on 141.2 but dont have an issue because they did not remove the account. |
@cheenamalhotra I have an update on this one. I was able to get ADAL returning and throwing the same error now. My firewall was blocking access to Azure Data Studio (since i removed the app and reinstalled it). Once I allowed connections i now get the same error: the console had this in it: |
I have the same problem. Went as far as remove all traces of Azure Data Studio and reinstalled clean. Nothing works. MSAL or ADAL both end up in the same 2 errors: |
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.
|
Can you please fetch Azure account logs as per above comment? Please verify if you've added this in settings.json (as I mentioned above: #22227 (comment), #22227 (comment)) |
@cheenamalhotra will upload logs. |
Please upload for both ADAL and MSAL, so I can help for both. |
Hi Everyone! Same problem here! Two logs for you. |
[Error]: MSAL: Error requesting auth code - [{"errorCode":"endpoints_resolution_error","errorMessage":"Error: could not resolve endpoints. Please check network and try again. Detail: ClientAuthError: openid_config_error: Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints. Attempted to retrieve endpoints from: https://undefined/organizations/v2.0/.well-known/openid-configuration","subError":"","name":"ClientAuthError"}] |
$onExtensionRuntimeError @ mainThreadExtensionService.ts:79 |
Thank you for the logs.
About this error, I recall seeing that when I was implementing MSAL support in vscode-mssql extension, that I also reported here: AzureAD/microsoft-authentication-library-for-js#4879 but hadn't seen that in ADS yet. Now it makes me think if it's related to some other factors too. I'm going to try updating to latest MSAL.js v1.16.0 if that helps resolve this issue, as it seems to contain a proper fix.
This seems related to a corrupted cache file leading to runtime error in MSAL, can you please try deleting cache file:
|
I deleted the cache and same error appeared |
Just looking at the code the error comes from parsing the response so it should not have anything to do with the cache. |
After you update to latest MSAL do I wait for next insider build? |
Yes, it'll be available in the next update. |
In case this is still needed. Logs are below. I'm using this with Azure Active Directory + Azure SQL. Here was the first log from adding account using ADAL. Here is the log from the MSAL |
I am also seeing this behaviour using Azure Data Studio v1.41.2. |
Just FYI, MSAL-Node update needs more work in insiders and has been postponed, but we're actively investigating on issues with the stable release. |
Hotfix or May release? |
Quick update. I did file a ticket with Azure Support. I will let you know once i hear back from them. I'm using visual studio code versions are below but both failed for me (MSAL and ADAL). It looks like the same error. = VS Code Version: Version: 1.76.1 |
Same thing here. 1.39.1 works, 1.40.2 does not. |
@cheenamalhotra i found another work around. I disabled this setting "System Certificates". Once i did that i was able to authorize using ADAL and MSL. To verify it actually fixed the error i then turned that setting back on, removed my account, and tried to add it again (and it did fail). Please let me know if this info helps in any way or if there is anything you would like me to check on myside. The good news is i have a workaround. |
Interesting! Could you also test with the latest insiders build and let us know if that helps in this case? |
Good morning, I can confirm that unticking the system certificates solved the issue in both Production and the latest Insider build. Reticking the box causes the issue to come back. Version: 1.43.0-insider and Version: 1.41.2 |
Confirmed here as well. Unchecking |
What would you like me to ask Azure to do? They are asking me to do some random stuff, i would like to help guide the convo. |
Hi @ncapito It does seem like a certificate is involved when this error occurs, if you could investigate which certificate is contributing to this error with Azure support that would be helpful. |
Unchecking Http: System Certs and switching to ADAL default connection works for me. |
What error do you get when using MSAL and "Http: System Certificates" unchecked? |
Same error as @ncapito above. Error adding account. I was also unable to edit my previous connections. |
It's strange, since others were able to unblock with MSAL too.. Could you also test adding account with VSCode-MSSQL extension in VS Code as well? You can find Azure related logs in the bottom Output pane: Azure Logs when using extension. Please open a new issue and attach any errors that you notice when adding account. |
Hi Everyone, We were able to find the expired Trusted Root Certificate Authority that caused this issue with one of the affected customers.
It's likely that due to organization policies this certificate wasn't updated in your case. You can find more info in the article from DigiCert: https://knowledge.digicert.com/generalinformation/digicert-root-and-intermediate-ca-certificate-updates-2023.html (March 8, 2023, ICA/Root Replacements) - that explains how the issue started on March 8, 2023. You would likely need to install the updated DigiCert Trusted Root CA Certificates. Please contact your organization or DigiCert support for official guidance on the same. |
I will proceed to close the issue as external. |
@cheenamalhotra I work somewhere where we have relatively loose controls around this. I've experienced this in Azure Data Studio and VS code (today). I'm not understanding how this is an organizational issue. Do you have instructions or guidance on how i can check this on a mac? |
Do you see an expired/not trusted DigiCert certificate in Keychain Access? |
I was having issues this morning with my Active Directory Universal MFA so i "removed the account." It now wont let me add it back. I've tried newer versions of ADS, I've restarted, i've cleared out he Library/Application Support/azuredatastudio directory. Nothing seems to work.
Version info:
Version: 1.41.2 (Universal)
Commit: 0f0960d
Date: 2023-02-08T20:15:24.215Z (3 wks ago)
VS Code: 1.67.0
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin x64 22.3.0
When i go to Linked Accounts -> Add an account i get errors with: "TypeError: Cannot read properties of undefined (reading 'authLibrary')"
The text was updated successfully, but these errors were encountered: