microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.58k stars 908 forks source link

Can't log in MS SQL Server. #25978

Closed Vnsabhay closed 1 month ago

Vnsabhay commented 1 month ago

Type: Bug

Connection Error: Error: invalid_grant occurred when acquiring token. 135010 - [2024-10-17 16:46:57Z]: AADSTS135010: UserPrincipal doesn't have the key ID configured. Trace ID: 460f8d5d-a1be-4298-9afe-05878a0a1800 Correlation ID: 52671184-a1f1-4e9a-adf3-580128b771a7 Timestamp: 2024-10-17 16:46:57Z - Correlation ID: 52671184-a1f1-4e9a-adf3-580128b771a7 - Trace ID: 460f8d5d-a1be-4298-9afe-05878a0a1800

Azure Data Studio version: azuredatastudio 1.49.1 (2f696aa95a13ccabd7e0a4431d1d759e3a7b8cfd, 2024-08-13T18:12:38.831Z) OS version: Windows_NT x64 10.0.26100 Restricted Mode: No Preview Features: Enabled Modes:

System Info |Item|Value| |---|---| |CPUs|13th Gen Intel(R) Core(TM) i7-1365U (12 x 2688)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.60GB (14.40GB free)| |Process Argv|-r --server=capacityreporting.database.windows.net --database=bireporting --user=abhasingh@microsoft.com| |Screen Reader|no| |VM|0%|
Extensions: none
jonmozley commented 3 weeks ago

In case anyone else encounters this issue, I cleaned up the cached token from here and it resolved the issue for me.

C:\Users{UserNameHere}\AppData\Roaming\azuredatastudio\Azure Accounts

Source: https://learn.microsoft.com/en-us/answers/questions/2080978/cannot-connect-to-azure-data-studio-sql-server-dat