0
votes

I want to collect the azure activity log.

{ curl -X GET https://management.azure.com/subscriptions/xxxxxxxxxxx/providers/microsoft.insights/eventtypes/management/values?api-version=2015-04-01 }

this curl command gives an error.

{"error":{"code":"AuthenticationFailed","message":"Authentication failed. The 'Authorization' header is missing."}}}

1

1 Answers

1
votes

According to the error, seems you need to add your Authorization Token.

curl -X GET -H "Authorization: Bearer [TOKEN]" -H "Content-Type: application/json" https://management.azure.com/subscriptions/xxxxxxxxxxx/providers/microsoft.insights/eventtypes/management/values?api-version=2015-04-01

For more details, you could refer to this link.