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

AZURE CONNECTION DOESN'T WORK #23211

Closed
malabarMCB opened this issue May 25, 2023 · 10 comments
Closed

AZURE CONNECTION DOESN'T WORK #23211

malabarMCB opened this issue May 25, 2023 · 10 comments

Comments

@malabarMCB
Copy link

Type: Bug

"Failed to get subscriptions" message after log in to azure. I'm able to manage dbs from azure portal but not from Data Studio. Issue occured after the update. Please, fix it.

Azure Data Studio version: azuredatastudio 1.44.0 (31bee67, 2023-05-19T16:52:43.653Z)
OS version: Darwin x64 22.4.0
Restricted Mode: No
Preview Features: Enabled
Modes:

System Info
Item Value
CPUs Apple M1 Pro (10 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 5, 5, 6
Memory (System) 32.00GB (2.17GB free)
Process Argv
Screen Reader no
VM 0%
Extensions: none
@github-actions
Copy link

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.

  • In the settings menu, find the setting titled Azure: Logging Level and select the Verbose option
  • Run the process that produces your error
  • Open command palette (Click View -> Command Palette)
  • Run the command: Developer: Open Logs Folder
  • Follow this path to find the Azure Accounts log file: [default log folder]/exthost1/output_logging_[earliest timestamp]/#-Azure Acounts.log
  • Please attach the Azure-Accounts.log file to the issue.

@malabarMCB
Copy link
Author

Hi,
The file is empty.
Also attaching the screenshot of the exact error.
1-Azure Accounts.log
Screenshot 2023-05-26 at 09 26 34

@kburtram
Copy link
Member

kburtram commented May 26, 2023

@malabarMCB have you tried removing and readding the accounts? This could help clear out any invalid state.

Also, the AAD implementation was updated in 1.44 to use SqlClient driver rather than MSAL.Net, which could have unexpected side-effects. You could try to disabling this update by unchecking the "Enable Sql Authentication Provider" option.

image

It's unusual that the Azure log file would be empty if your hitting account errors. Are you seeing any other errors in the Help->Developer Tools Console, or the other log files?

Note: this could be related to #23210

@cheenamalhotra
Copy link
Member

cheenamalhotra commented May 27, 2023

As the message says, you need to refresh credentials by re-authenticating with AAD. You can either refresh credentials in the linked accounts pane using the refresh icon or remove and add account.

If it doesn't work, to collect logs, make sure you reload ADS and once you reproduce the error again, you can either find logs in the "Azure Accounts" output pane or the Azure Accounts log file as per above. Once you open the file it will load logs from process and populate for you.

Side note: When fetching subscriptions, we continue to use MSAL.JS and this design is not related with 'Enable Sql authentication provider' setting.

@shahiddev
Copy link

@malabarMCB Do you have more than one Azure AD tenant under your account?
I hit this issue as I have a few tenants some without any subs.
To fix I had to add a tenant filter in the settings.json to exclude the tenants that don't have subs
image

@malabarMCB
Copy link
Author

@malabarMCB Do you have more than one Azure AD tenant under your account? I hit this issue as I have a few tenants some without any subs. To fix I had to add a tenant filter in the settings.json to exclude the tenants that don't have subs image

I have the only one tenant

@malabarMCB
Copy link
Author

@malabarMCB have you tried removing and readding the accounts? This could help clear out any invalid state.

Also, the AAD implementation was updated in 1.44 to use SqlClient driver rather than MSAL.Net, which could have unexpected side-effects. You could try to disabling this update by unchecking the "Enable Sql Authentication Provider" option.

image

It's unusual that the Azure log file would be empty if your hitting account errors. Are you seeing any other errors in the Help->Developer Tools Console, or the other log files?

Note: this could be related to #23210

it didn't help

@malabarMCB
Copy link
Author

As the message says, you need to refresh credentials by re-authenticating with AAD. You can either refresh credentials in the linked accounts pane using the refresh icon or remove and add account.

If it doesn't work, to collect logs, make sure you reload ADS and once you reproduce the error again, you can either find logs in the "Azure Accounts" output pane or the Azure Accounts log file as per above. Once you open the file it will load logs from process and populate for you.

Side note: When fetching subscriptions, we continue to use MSAL.JS and this design is not related with 'Enable Sql authentication provider' setting.

Tried to log out and log in a few times. Still the same error

@cheenamalhotra
Copy link
Member

cheenamalhotra commented Jun 1, 2023

@malabarMCB

Please try these steps: #23286 (comment) and let us know? Pasting Mac specific instructions:

  • Close Azure Data Studio
  • Remove the cache files in folder: $HOME/Library/Application Support/azuredatastudio/Azure Accounts
  • Delete these credentials in "Keychain Access":
    • image
    • image
  • Restart Azure Data Studio and refresh credentials as prompted.

@cheenamalhotra
Copy link
Member

Closing due to inactivity.

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

No branches or pull requests

4 participants