title: Azure consumption api returning blank value
body: <p>I am trying to use the azure consumption api to get usage details for my subscription, but it keeps returning a blank array. I know there should be something there.</p>
  <pre><code>$VaultName = 
  $KeyName = 
  
  $tenantId = 
  $applicationId = 
  $SubscriptionId =
  
  $apiEndpointUri = &quot;https://management.azure.com/&quot;  
  $secret = Get-AzKeyVaultSecret -VaultName $VaultName -Name $KeyName -AsPlainText
  
  $RequestAccessTokenUri = &quot;https://login.microsoftonline.com/$tenantId/oauth2/token&quot;
  $body = &quot;grant_type=client_credentials&amp;client_id=$($applicationId)&amp;client_secret=$($secret)&amp;resource=$($apiEndpointUri)&quot; 
  
  $AccessToken = Invoke-RestMethod -Method Post -Uri $RequestAccessTokenUri -Body $body -ContentType $contentType
  
  $apiuri = &quot;https://management.azure.com/subscriptions/$($SubscriptionId)/providers/Microsoft.Consumption/usageDetails?$filter={reportedstartTime=2022-03-01&amp;reportedendTime=2022-04-01}&amp;api-version=2021-10-01&quot;
  $headers = New-Object &quot;System.Collections.Generic.Dictionary[[String],[String]]&quot;
  $headers.Add(&quot;Authorization&quot;, &quot;Bearer $($AccessToken.access_token)&quot;)
  
  Invoke-RestMethod -Uri $apiuri -Headers $headers | ConvertTo-Json
  </code></pre>
  <p>This is the response every time</p>
  <pre><code>{
      &quot;value&quot;:  [
  
                ]
  }
  </code></pre>
  <p>I have tried everything I can think of to change the $apiuri around. And I know all the auth parts are correct.</p>