Azure / azure-cosmosdb-ads-extension

Azure Data Studio extension for Azure CosmosDB
MIT License
16 stars 10 forks source link

NoSQL for CosmosDB - Queries not authenticating using Entra ID #104

Closed JeffreySchmitz-Motion10 closed 7 months ago

JeffreySchmitz-Motion10 commented 8 months ago

I installed the Insider Build to be able to query our CosmosDB (SQL API) using Entra ID authentication. This CosmosDB account has local authentication disabled. Connecting to the account works, i can see and select the database and the same for the containers, but when i try to execute a query against one of the containers (a simple select * from c) i get the following error: Response status code does not indicate success: Unauthorized (401); Substatus: 0; ActivityId: 2c27b6a5-f7a6-4f7f-9687-070071d8725a; Reason: (Local Authorization is disabled. Use an AAD token to authorize all requests. ActivityId: 2c27b6a5-f7a6-4f7f-9687-070071d8725a, Windows/10.0.17763 cosmos-netstandard-sdk/3.18.0, Windows/10.0.19045 cosmos-netstandard-sdk/3.30.8);

So it seems the query itself is using the Entra Authentication to execute it. The above i tried with both selecting the server from the browse tab and manually entering the server information with the same result.

Version Info: Version: 1.48.0-insider (system setup) Commit: 089c207048b03208186001656864ea0eb241c9f3 Date: 2024-01-04T06:32:38.323Z VS Code: 1.82.0 Electron: 25.9.6 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045

languy commented 7 months ago

Unfortunately, RBAC is not supported, yet. For now, you can use Data Explorer with a special query parameter to access your account. More details here.