Error 403 while executing query using resoure URI
I have enabled diagnostic agent and storing l the metrics data in a storage. My focus is to use KQL query rest api and fetch the disk related details. So i am using the below mentioned Rest API -
GET https://api.loganalytics.io/v1/{resourceId}/query?query={query}
But i am getting 403 error, stating that given credentials do not have access to read logs for this resource. The details of error are -
error":{"message": "The provided credentials have insufficient access to perform the requested operation","code":"InsufficientAccessError", "correlation Id":"xxxx", "innererror": {"code":"AuthorizationFailedError", "message": "Given credentials do not have access to read logs for this resource"}}}
Although i have already enabled data.read permission and reader role.
And I am able to run the below rest api using same credentials, but i want to use above mentioned rest api-
GET https://api.loganalytics.io/v1/workspaces/{workspaceId}/query?query={query}