title: "AuthorizationFailed" when requesting Azure metrics data
body: <p>I'm trying to access metrics data in my localhost (<a href="http://localhost:8100" rel="nofollow noreferrer">http://localhost:8100</a>) Ionic webapp of my resources using the Active Directory App Registration.
  My administrator created a new app registration for my localhost app make it possible to request a new Bearer accesstoken.
  After receiving the accesstoken I would like to let the application use this accesstoken to request metrics data.<br>
  One of the urls my webapp uses to call metrics (http GET request) is: <br></p>
  
  <p><code>"https://management.azure.com/subscriptions/{subscription_id}/resourceGroups/{resourcegroup_name}/providers/Microsoft.Compute/virtualMachines/{VirtualMachine_name}/providers/microsoft.insights/metrics?api-version=2018-01-01&amp;metricnames=Percentage%20CPU&amp;timespan=2018-10-16T03:00:00Z/2018-10-17T03:00:00Z"</code> <br><br> with headers: <br>
  <code>Authorization: {Bearer access_token},</code><br>
  <code>Content-Type: 'application/json'</code><br><br></p>
  
  <p>Unfortunately, after sending this get request it returns the error <code>"AuthorizationFailed"</code> (http error code 403) with message: <br><br> <code>"The client '{client id}' with object id '{same as client id}' does not have authorization to perform action 'microsoft.Insights/metrics/read' over scope '/subscriptions/{subscription_id}/resourceGroups/{resourcegroup_name}/providers/Microsoft.Compute/virtualMachines/{VirtualMachine_name}/providers/microsoft.Insights'."</code> </p>
  
  <p><br><br> What is going wrong here?</p>