App access to Azure Data Explorer

Microsoft

I am trying to give my app access to Azure Data Explorer:

I have followed the steps listed here to setup the app:

https://docs.microsoft.com/en-us/azure/data-explorer/provision-azure-ad-app

 

gamarapp_0-1609137417005.png

 

gamarapp_1-1609137697004.png

 

I am able to generate a valid AAD token too using the steps in this link: https://docs.microsoft.com/en-us/azure/data-explorer/kusto/api/rest/request

But any attempt to run a query on the database gives this error:

 

BadRequest_EntityNotFound: Request is invalid and cannot be executed.
Entity ID '<databasename>' of kind 'Database' was not found.

 

Below is the request that I have tried:

 

curl --location --request POST 'https://help.kusto.windows.net/v2/rest/query' \
--header 'Authorization: Bearer <token> \
--header 'Content-Type: application/json' \
--data-raw '{
    "db":"<database name>",
  "csl":"<tablename> | take 5"
}'
 
The csl query used in the request works well when tried in query explorer
0 Replies