Issue Type: Bug
My employer has an Azure SQL DB. Originally, all devs connected to this DB using a shared SQL login named "Developer". Later policies were improved and each dev was assigned their own SQL login (mine is called "ian") and the Developer login's password was changed.
When I first connected to Azure SQL using ADS, I used the Developer login and ticked the "Remember password" box. But since I now have to use my own account, I login with ian and my own password, again choosing to have my credentials remembered.
The bug: ADS only remembers the Developer login, not ian. Which means that every time I try to connect to the DB, I am told "login failed for user Developer" and have to type in my ian login.
Second part of the bug: When I type ian in the login box, the password that was supposedly remembered is not filled in.
This is... extremely annoying, to say the least.
SQL Server Management Studio gets this right:
Login functionality is really the absolute most basic feature of any app that you need to have 100% working before you even consider shipping an alpha, and the fact that it doesn't Just Work in ADS is incredibly disappointing. This sort of lack of quality is something I'd expect from a startup, not a multibillion-dollar company like Microsoft. I don't mind testing your software for you, I do mind when it doesn't work any better than the software that already exists (SSMS).
Simplest fix: tell me where/how I can delete saved credentials from ADS. I'd prefer to only delete the Developer login, but if the only option is getting rid of all of them, I can handle it.
Better fix: make the damn login functionality work like it should.
Best fix/feature request: some sort of UI to view all credentials grouped by DB server, with the option to add, remove and set a specific login as default.
Azure Data Studio version: azuredatastudio 1.13.0 (cacd481bff25c890e4130aee392569bae43b7e60, 2019-11-02T00:40:05.147Z)
OS version: Windows_NT x64 10.0.18362
System Info
|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (8 x 1992)|
|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: unavailable_off
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|15.90GB (2.77GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|
Extensions (2)
Extension|Author (truncated)|Version
---|---|---
ssmskeymap|kev|1.1.0
profiler|Mic|0.9.0
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
I didn't know about the linked issues so this one could be considered a dupe, but seriously - those issues have been sitting around for literally months without any work being done on them.
I'll say it again, login functionality is a basic thing that needs to work 100% before you ship a product. And if it doesn't work, you need to fix it fast. That's not happening, which leads me to question whether there is any reason to use ADS.
@IanKemp We don't support modifying existing connections at this time. If you delete the connection and then reconnect with the new username does it still not save correctly?
@IanKemp the Connection metadata is in the User Setting, which can be reached from the Open Settings (JSON) command in the Command Palette (available from F1). In the JSON file you should be able to directly modify the username for the connection. Thanks for reporting this bug.
@IanKemp the Connection metadata is in the User Setting, which can be reached from the
Open Settings (JSON)command in the Command Palette (available from F1). In the JSON file you should be able to directly modify the username for the connection. Thanks for reporting this bug.
The connection metadata under the "Servers" section, yes. But connections under "Azure" are the problem here, and I can't figure out where that metadata is living.
I've been suffering from this quite a while; Even uninstalling, cleaning up everything and reinstalling doesn't seem to make this go away completely.
It seems to always default to an SQL login with the admin user created by Azure when the DB was made. What makes it worse, even if i, say, expand one node and ignore the error, login with AD successfully again, the next node expansion does the same thing.
This is still a problem and as the OP mentioned is VERY annoying!
Steps to reproduce
-Open ADS, login to your Azure SQL db with admin username/password, check "save password"
-Login using AD auth
-Change the admin password on the db
-Delete all connections and user information in the JSON described above; remove the cached token file for AD auth
-Uninstall and reinstall ADS
-Open ADS, connect to Azure SQL db with AD auth again
-Expand another db object
Expected: the object explorer expands the object
Actual: login error for username of db admin account
Where are those creds stored so we can remove them?
Just tried to give the product a second try and spent an hour trying to force it to remember that I want to authenticate with Azure AD with MFA. I could not. I removed everything from GUI, cleared connections and recent connections, cleaned the settings.json, restarted the app, used auto-discover to connect to Azure databases without explicit connectionstrings ... and STILL it magically tries to connect with ancient and no longer valid sql user. And fails. Every time I start the client I have to go click around to change auth type. For every DB. Every time.
Get a grip and wipe the magic cache!
Or overwrite the cache on successful connection.
Or clear auth cache on auth fail.
Or offer a magic "reset cache" button.
Or .. Everything is better than the current state..
Just tried to give the product a second try and spent an hour trying to force it to remember that I want to authenticate with Azure AD with MFA. I could not. I removed everything from GUI, cleared connections and recent connections, cleaned the settings.json, restarted the app, used auto-discover to connect to Azure databases without explicit connectionstrings ... and STILL it magically tries to connect with ancient and no longer valid sql user. And fails. Every time I start the client I have to go click around to change auth type. For every DB. Every time.
Get a grip and wipe the magic cache!
Or overwrite the cache on successful connection.
Or clear auth cache on auth fail.
Or offer a magic "reset cache" button.
Or .. Everything is better than the current state..
It's pretty obvious that the current Azure Data Studio dev team is clueless and should not be allowed anywhere near code, but someone high up at Microsoft has ADS as a pet project and they don't care about its quality, they're merely concerned with foisting it on as many customers as possible (the latest version of SSMS bundles ADS with it with no option to avoid installing it).
All we can do is avoid this broken piece of trash and continue to use SSMS - until, of course, the powers that be at MS decide to make its features stop working in the name of "deprecation" or "unsupported" to force people to use this rubbish called ADS.
I had a similar issue after a password reset and found this work around. I am on the latest version as of this post.\
It looks like ADS was caching the token and even thought my PW had changed and I had tried to refresh the token it would fail to use the new info.
I'm having the same issue as @IanKemp and others with Azure SQL connections. Under CONNECTIONS / SERVERS, I am able to manually add an Azure SQL connection to a server/database using 'AAD - Universal w/ MFA' authentication. However, under CONNECTIONS / AZURE, when I attempt to connect to server/databases (that I have access to with my Azure AD account), I get 'Connection Error Login failed for user 'sqladmin account'. To be clear 'sqladmin account' is the Server admin account for the Azure SQL Server, and I have used that account before, but we have a need to use Azure AD accounts now and not SQL logins.
I am using ADS 1.24.0 and have uninstalled and reinstalled twice, manually removing my Roaming user data. Any ideas how to remove the cached user logins?
Possible HINT? When adding a connection manually, in the Browse (Preview) section, it displays the Azure SQLs from all of my subscriptions, and ALL of them have the User name saved ('sqladmin account') and SOME of them have saved passwords. Where is this coming from?