I am stuck on step 2.4 of this wiki
In the previous step, I get a valid token.
Why do I get "Valid authentication was not provided"?
I added a header called Authorization - see picture.
What am i missing?
When we use Azure Log Analytics REST API to do a query, we need to use Authorization=Bearer eyJ....
as request Headers. For more details, please refer to here.
For example
Register Azure AD application
Give the AAD Application access to our Log Analytics Workspace. Please assign Log Analytics Reader
role to the AD application
Get access token
POST /<your tenant id>/oauth2/token HTTP/1.1
Host: login.microsoftonline.com
Content-Type: application/x-www-form-urlencoded
grant_type =client_credentials
&client_id=<>
&client_secret=<>
&resource=https://westus2.api.loganalytics.io
POST https://api.loganalytics.io/v1/workspaces/{workspaceId}/query
Authorization: Bearer ey...
Content-Type: application/json
{
"query": ""
}