Issue Type: Bug
I get an error from ADS when I try to log into Azure
Azure Data Studio version: azuredatastudio-insiders 1.12.0-insider (f475c04ce33cebe739cad383410a1f4a48f041b0, 2019-10-09T08:22:13.771Z)
OS version: Windows_NT x64 10.0.17134
System Info
|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (8 x 2112)|
|GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|15.93GB (3.79GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|
Extensions: none
The error is Entry not found in cache
And its from extensions\azurecore\node_modules\adal-node\lib\token-request.js
I'm unable to repro this issue. When you open the application, go to help -> toggle developer tools.
Do you see this anywhere in the logs:
Initialized Azure account extension storage.
Do you also see any errors in the logs when the login fails?
I don’t see any logs in the dev tools (I’m a DBA so it could be that I’ve just not seeing it).
I have been getting this error for the last couple of months since 1.8, I also don't see that message
"Initialized Azure account extension storage".
[createInstance] First service dependency of AccountManagementService at position 2 conflicts with 0 static arguments
console.(anonymous function) @ c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280
c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280 [createInstance] First service dependency of ConnectionManagementService at position 3 conflicts with 0 static arguments
console.(anonymous function) @ c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280
c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280 [Extension Host] Message This sample code loads the file into a data frame and shows the first 10 results. didn't get externalized correctly.
console.(anonymous function) @ c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280
c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280 [Extension Host] logFile for MicrosoftSqlToolsServiceLayer.exe is c:\Users\UserAccount\AppData\Roaming\azuredatastudio\logs\20191028T163555\exthost1\Microsoft.mssql\sqltools.log
c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280 [Extension Host] This process (ui Extenstion Host) is pid: 78656
c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280 [Extension Host] Old log files deletion report: {}
c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280 [Extension Host] logFile for SqlToolsResourceProviderService.exe is c:\Users\UserAccount\AppData\Roaming\azuredatastudio\logs\20191028T163555\exthost1\Microsoft.mssql\resourceprovider.log
c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280 [Extension Host] This process (ui Extenstion Host) is pid: 78656
c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280 [Extension Host] Old log files deletion report: {}
c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280 [Extension Host] logFile for MicrosoftSqlToolsCredentials.exe is c:\Users\UserAccount\AppData\Roaming\azuredatastudio\logs\20191028T163555\exthost1\Microsoft.mssql\credentialstore.log
c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280 [Extension Host] This process (ui Extenstion Host) is pid: 78656
c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280 [Extension Host] Old log files deletion report: {}
c:\Users\UserAccount\AppData\Local\Programs\Azure Data Studio\resources\app\node_modules.asar\zone.js\dist\zone-node.js:2280 [Extension Host] (node:78656) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Version: 1.12.2 (user setup)
Commit: c9bef82ace6c67190d0e83820011a2bbd1f793c1
Date: 2019-10-11T04:56:40.634Z
VS Code 1.37.0
Electron: 4.2.9
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.19002
Looks like some folks are still running into this issue. @aaomidi is there a known workaround for this?
With the new logs I should be able to look into this more. Thanks!
Hi All:
I can repro this continuously on
Version: 1.13.0-insider (user setup)
Commit: f8067ffadab178d2929a162408032ff63b0b717b
Date: 2019-10-25T09:46:57.975Z
VS Code: 1.38.0
Electron: 6.0.12
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18362
It doesn't allow "Sign in to Azure" or connecting to a Azure SQL DB with MFA
Is this a personal azure account or azure for work?
I was using a work or school account
Thank You,
Denny Cherry
Owner & Principal Consultant
Denny Cherry & Associates Consulting
[email protected] | +1 (323) 686-1478
From: Amir Omidi notifications@github.com
Sent: Friday, November 22, 2019 11:55:28 AM
To: microsoft/azuredatastudio azuredatastudio@noreply.github.com
Cc: Denny Cherry denny@dcac.com; Author author@noreply.github.com
Subject: Re: [microsoft/azuredatastudio] Unable to login to Azure (#7619)
Is this a personal azure account or azure for work?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/azuredatastudio/issues/7619?email_source=notifications&email_token=AEZIJASQ6BIQLPWNKSFCOZ3QVA2LBA5CNFSM4I7F52UKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE6WKOQ#issuecomment-557671738, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEZIJAX2YVE2UL4GI2UQXK3QVA2LBANCNFSM4I7F52UA.
Is this a personal azure account or azure for work?
Work or school account as well
Do you know if you have conditional access setup?
We do not have CA setup
Thank You,
Denny Cherry
Owner & Principal Consultant
Denny Cherry & Associates Consulting
[email protected] | +1 (323) 686-1478
From: Amir Omidi notifications@github.com
Sent: Friday, November 22, 2019 12:29:58 PM
To: microsoft/azuredatastudio azuredatastudio@noreply.github.com
Cc: Denny Cherry denny@dcac.com; Author author@noreply.github.com
Subject: Re: [microsoft/azuredatastudio] Unable to login to Azure (#7619)
Do you know if you have conditional access setup?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/azuredatastudio/issues/7619?email_source=notifications&email_token=AEZIJAWVOHQGHXO7OYIZ5UDQVA6MNA5CNFSM4I7F52UKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE6ZBFA#issuecomment-557682836, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEZIJAQVLMP5N5OCHXJPIPLQVA6MNANCNFSM4I7F52UA.
Do you know if you have conditional access setup?
No conditional access enabled here
Information: I had this problem with my work/school account as well. I found some online resources that suggested that this problem is because the account is linked to more than one Azure subscriptions - which was true in my case.
Out of the two, 1 of them was disabled (not deleted but disabled/deactivated) and one active subscription.
Workaround: Delete any inactive/disabled Azure subscriptions.
I am unsure if it's a problem to have more than one Azure subscription at all or if it's because one of the subscription was inactive.
We also have multiple subscriptions on our account.
Additionally my account has access to multiple accounts.
Thank You,
Denny Cherry
Owner & Principal Consultant
Denny Cherry & Associates Consulting, an Inc. 5000 company
[email protected]denny@dcac.com
(o) +1 (323) 686-1478
Online Calendar Bookingshttps://calendly.com/mrdenny
[cid:[email protected]]http://www.dcac.co/
[cid:[email protected]]
[cid:[email protected]]
[cid:[email protected]]
From: Simon Gottipalli notifications@github.com
Sent: Sunday, November 24, 2019 11:55 PM
To: microsoft/azuredatastudio azuredatastudio@noreply.github.com
Cc: Denny Cherry denny@dcac.com; Author author@noreply.github.com
Subject: Re: [microsoft/azuredatastudio] Unable to login to Azure (#7619)
Information: I had this problem with my work/school account as well. I found some online resources that suggested that this problem is because the account is linked to more than one Azure subscriptions - which was true in my case.
Out of the two, 1 of them was disabled (not deleted but disabled/deactivated) and one active subscription.
Workaround: Delete any inactive/disabled Azure subscriptions.
I am unsure if it's a problem to have more than one Azure subscription at all or if it's because one of the subscription was inactive.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/azuredatastudio/issues/7619?email_source=notifications&email_token=AEZIJASQTJSPZMBEKCFBVC3QVOADTA5CNFSM4I7F52UKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFBPB6I#issuecomment-558035193, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEZIJAVENAKQUX7WJ4AXJZDQVOADTANCNFSM4I7F52UA.
My account also has access to multiple subscriptions across single and multiple tenants
I'm currently in the process of re-working our azure login experience. I'll update this issue once we have an updated version out.
I'm unable to repro the specific bug you're suggesting.
The problem here isn't with multi tenancies, its down to how ADS is interpreting MFA configuration. I was using conditional access and MFA enforcement across the tenancy. As it turns out both can directly affect one another. I needed to adjust conditional access policy and enforce MFA in this portal: https://account.activedirectory.windowsazure.com/usermanagement/multifactorverification.aspx
Hope this helps.
@aaomidi do you expect the recent auth work you've merged will help with this issue? If so, could you please add a note on how to enable in the insiders\Dec release so users can validate prior to swap auth mechanisms in Feb release?
Sure! The functionality should be available to test in insiders.
From @kburtram in https://github.com/microsoft/azuredatastudio/issues/8298#issuecomment-565216193
To enable the new sign-in process please add environment variable NEW_SIGN_IN_EXPERIENCE with a value of true. The plan is to make this the default Azure sign-in experience in Feb release.
Please update this issue if this process helped or didn't help with this issue.
Thanks, this seems to have fixed my issue!
NEW_SIGN_IN_EXPERIENCE=true fixed my inability to log in due to this error message, so thank you!
However, after my connection has timed out in a query editor and I try to execute a query, I get this message:
Started executing query at Line 8
Msg 18456, Level 14, State 1, Line 65536
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
Total execution time: 00:00:00.295
I then have to manually disconnect and then reconnect. This may be better logged as a separate issue, but it would be preferable for that to either:
A) tell me "not logged in" instead of "login failed..."
B) disconnect the query automatically to save me a click
C) re-connect me automatically
or some combination of those.
@aaomidi I think we can switch the default experience in master now since we're past the Dec release branch. If there's nothing else we're tracking on his bug we close it now.
This fixed my SignIn Problems (even with different Tenants), i can now work on the Azure Databases.
But if I i right click on Database to Manage in the Azure Pane, then i can not connect because the connection will not be pre configured with the right Authentication Values. I have to select Azure AD MFA as Authentication, then it works.
NEW_SIGN_IN_EXPERIENCE=true fixed my inability to log in due to this error message, so thank you!
However, after my connection has timed out in a query editor and I try to execute a query, I get this message:
Started executing query at Line 8
Msg 18456, Level 14, State 1, Line 65536
Login failed for user 'NT AUTHORITYANONYMOUS LOGON'.
Total execution time: 00:00:00.295I then have to manually disconnect and then reconnect. This may be better logged as a separate issue, but it would be preferable for that to either:
A) tell me "not logged in" instead of "login failed..."
B) disconnect the query automatically to save me a click
C) re-connect me automatically
or some combination of those.
I can repro this as well... It is not stable as it is... Should we open a new issue?
I would recommend creating a new issue for that.
Most helpful comment
NEW_SIGN_IN_EXPERIENCE=truefixed my inability to log in due to this error message, so thank you!However, after my connection has timed out in a query editor and I try to execute a query, I get this message:
I then have to manually disconnect and then reconnect. This may be better logged as a separate issue, but it would be preferable for that to either:
A) tell me "not logged in" instead of "login failed..."
B) disconnect the query automatically to save me a click
C) re-connect me automatically
or some combination of those.