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

Sign in to Azure is stuck when using Proxy #17356

Closed
preethamrajk opened this issue Oct 13, 2021 · 15 comments · Fixed by #20692
Closed

Sign in to Azure is stuck when using Proxy #17356

preethamrajk opened this issue Oct 13, 2021 · 15 comments · Fixed by #20692

Comments

@preethamrajk
Copy link

Issue Type: Bug

When I want to connect my Azure AD account, I am stuck after I enter my credentials and login on Azure Login page and I don't get a successful callback to Azure Data Studio.

Azure Data Studio version: azuredatastudio 1.32.0 (4a45ba7, 2021-08-16T18:08:28.086Z)
OS version: Windows_NT x64 10.0.19042
image
image

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz (8 x 1992)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.75GB (2.99GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (2)
Extension Author (truncated) Version
schema-compare Mic 1.11.0
sql-database-projects Mic 0.12.0
@kburtram
Copy link
Member

@preethamrajk I wasn't able to reproduce this though it looks like the pending callback there is the vscode redirect server. I'm surprised that server is there as I thought we used a localhost redirect. @cssuh is the vscode server redirect expected here?

You may try enabling the "Device Code" authentication in the User Settings. That auth mechanism doesn't require the redirects so may bypass this issue.

@preethamrajk
Copy link
Author

@kburtram
Thanks for the quick triage. Where do I enable the "Device Code"?

We already have MFA enabled at tenant level for User login.

@preethamrajk
Copy link
Author

Ignore my previous request. I worked it out.

I cannot login even with Device Code. Below is what I get when I try to authenticate using Device Code.

image

Possibly the same as #15560

Dunno if it matters or not, but I am behind ZScaler proxy.

@philipphomberger
Copy link

I have the same Issue at 2 Terminal Servers (Windows Server 2019). At the moment I have no Idea why. Because I have a lot of other Servers there this problem is not exist. I have try reinstall the Application but that not change anything.

@philipphomberger
Copy link

Here some more input from my side:
After login to Azure in the Browser:
Bildschirmfoto 2022-01-20 um 08 09 57
I get a loop.
Than I open the calback link in the Developer Tools.
Bildschirmfoto 2022-01-20 um 08 17 49
The site load in a loop for some minutes.
Than the Connection get close.
Bildschirmfoto 2022-01-20 um 08 18 45
And in the Application I can see that error.
Bildschirmfoto 2022-01-20 um 08 19 23
And this in the log.
Bildschirmfoto 2022-01-20 um 08 24 39

@cssuh cssuh modified the milestones: February 2022 Release, Backlog Feb 1, 2022
@cssuh cssuh modified the milestones: Backlog, October 2022 Release Aug 26, 2022
@cheenamalhotra cheenamalhotra changed the title Sign in to Azure is stuck Sign in to Azure is stuck when using Proxy Sep 1, 2022
@preethamrajk
Copy link
Author

@cssuh @kburtram

Any update on this?

This has been in the backlog for a year.

@cssuh
Copy link
Member

cssuh commented Sep 6, 2022

Hi @preethamrajk, we are working on this now, and plan to have it in our October release.

@preethamrajk
Copy link
Author

Still having the same issue @cssuh.

Don't think this has been fixed in the latest release from yesterday.

Version: 1.40.0 (system setup)
Commit: 3fbaa3de931ef433090fe3deb8c89cba99d7952b
Date: 2022-11-11T22:47:05.361Z
VS Code: 1.67.0
Electron: 17.4.11
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.14-electron.0
OS: Windows_NT x64 10.0.19042

@cssuh
Copy link
Member

cssuh commented Nov 16, 2022

Hi @preethamrajk, can you please share the error you're seeing?

@preethamrajk
Copy link
Author

@cssuh

This is what I see after I signin from the browser and the browser doesn't complete authentication.
Browser:
image

Data Studio:
image

@preethamrajk
Copy link
Author

Adding logs from

.....\azuredatastudio\logs\20221117T105753\exthost1\output_logging_20221117T105758

[Verbose]: Starting login - []
[Verbose]: Fetching token - []
[Error]: Login failed - []
[Error]: Error: socket hang up - []

@cssuh
Copy link
Member

cssuh commented Nov 17, 2022

@preethamrajk Can you also please share your proxy settings?

@preethamrajk
Copy link
Author

Here it is

C:\WINDOWS\system32>SET | findstr "PROXY"
HTTPS_PROXY=http://127.0.0.1:9000
HTTP_PROXY=http://127.0.0.1:9000
NO_PROXY=localhost,127.0.0.0/8,*****.com.au,*****.net.au,*.australiaeast.azmk8s.io,*.australiasoutheast.azmk8s.io, login.docker.com

@cssuh
Copy link
Member

cssuh commented Dec 6, 2022

@preethamrajk
You also need to whitelist the following URLs:

https://management.azure.com
https://login.microsoftonline.com

you may need to whitelist additional URLs but this can sometimes vary on a case-by-case basis - in order to verify you aren’t blocking any URLs from going through, go to Help > Toggle Developer Tools and select the Network tab. Here you will see any URLs that are getting blocked that you may need to whitelist to successfully add your account.

@preethamrajk
Copy link
Author

Hi @cssuh

Those URLs are already whitelisted by the Network guys. As you can imagine, the whole corp network would be crippled without access to these URLs.. 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants