Jay
Jay

Reputation: 3040

Azure Data Explorer Cluster - Details: "Access to the resource is forbidden."

I went through the steps here.

https://learn.microsoft.com/en-us/azure/data-explorer/create-cluster-database-portal

Created the cluster just fine. Created a database that connects to the cluster. Also set.

Next, I was able to ingest data (using the web query tool - https://learn.microsoft.com/en-us/azure/data-explorer/web-query-data ) as well. So, I definitely have access with the account that created the cluster. Able to run kusto queries and all that.

Then, I found out that Azure Data Explorer works fine with Excel and Kusto desktop tool (available here - https://learn.microsoft.com/en-us/azure/kusto/tools/kusto-explorer )

I tried connecting from the desktop with the Kusto tool.

Then, I tried connecting via Excel.

In both cases, I am getting the exact same error

Details: "Access to the resource is forbidden."

In both kusto and Excel, I get the same login flow (the standard Microsoft account login widow with 2 factor enabled) and I am able to sign in, as I always do with any Microsoft service.

So, why am I getting the error?


detailed error from kusto as follows

    "code": "Forbidden",
    "message": "Caller is not authorized to perform this action",
    "@type": "Kusto.Common.Svc.Exceptions.UnauthorizedOperationException",
    "@message": "Principal '[email protected]' is not authorized to perform operation 'DiagnosticsShowCommand' on 'https://xxx.southindia.kusto.windows.net:443/'.",

Update

Adding on to the solution provided below, note for other users. If the web query tool also fails (and gives permission error), under your cluster resource in azure portal (after Overview, but in the same section), you have the option to directly run queries. (Select the option 'Query')

Upvotes: 1

Views: 5998

Answers (1)

LMG
LMG

Reputation: 1370

You need to explicitly add the user to the database.

.add database Test users ('[email protected]') 'Test user (live.com)'

Reference: kusto principals and identity

Upvotes: 3

Related Questions