-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
connect-azaccount Azure.RequestFailedException: The SSL connection could not be established #13647
Comments
as a follow up, i did run the invoke-webrequest -uri "https://www.google.com" and it does respond as expected. StatusCode : 200 I am still doing research, currently down a rabbit hole of something messed up with provided certificates (from Microsoft) that somehow got messed up, but I seem to keep hitting red-herrings. |
Additional info, i am doing wireshark captures and every other communication out is going through our proxy, except the connect-azaccount is not. Now technically, I think we have a direct connection to the azure cloud as we have a tenant in the gov cloud, but even if I do an invoke-webrequest -uri "login.microsoftonline.com" it goes through the proxy, successfully. |
And yet more info. In digging into proxy settings, PowerShell 7 is supposed to use the proxy defined in the internet proxy settings, in my case it is setup to use a script (per enterprise requirements.) And my coworker can use PowerShell 7 and connect to the internet without any changes, however I have to force it to use a proxy with the following: I changed the actual proxy url name and port. |
We will look into that. |
update: This definitely has to do with the proxy, but possibly outside the connect-azaccount control? |
@dweddig01 can you confirm if your colleagues are using the same version of Az.Accounts? |
There was a bug Azure/azure-sdk-for-net#16990 in Azure.Core which causes http proxy is not respect in Windows Azure PowerShell, please mitigate the issue by:
The environment is just workaround before applying updated Azure.Core into Azure PowerShell, we plan to apply the fix into Azure PowerShell around Jan 2021. |
Thank you for the update! |
Description
Attempting to connect to azure with connect-azaccount command. Continue to return SSL connection could not be established. I am able to reproduce this issue with both PowerShell 5.1 and PowerShell 7. When monitoring traffic with wireshark there is a reset being executed after login.microsoft.com connection is made, and the remote reset is being done by www.tm.a.prd.aadg.akadns.net. It does work for a colleague of mine in the same network, so appears isolated to my machine. Difference is that I have been using the web browser to connect to multiple different Azure accounts over the last three weeks. Browser sessions still work, but attempting to connect through PowerShell does not.
I do see similar ssl connect issues, but none appear related, or I am not understanding what the actual resolution is. I have tried multiple steps. Including turning off certificate validation: [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
(event tried setting to $false) just to see what happens.
I am guessing it is related to some persistance data, or it is related to a certificate that for some reason is not passing through.
I am unable to provide a full network capture as there is too much data I would have to cleanse, but can provide more detailed snippets if that helps.
Steps to reproduce
Environment data
Module versions
Debug output
Error output
The text was updated successfully, but these errors were encountered: