The Azure Cost Management API Usage Query - Error Not Found: Not supported

DANIEL LU 1 Reputation point
2021-03-09T17:56:22.123+00:00

I'm working a project that requires periodic fetching of usage data for all the subscriptions in our tenant via the cost management api. In doing so, I noticed this error would appear for subscriptions that were just recently created/purchased (and likely still being set up) and would essentially resolve itself after a few days. This is an issue for automation so I was wondering if there was any work around or if this is a known issue that is being solved? I considered possibly looking for a way to query purchase date (is there an easy way to do that?) and filtering subscriptions to just avoid ones that were only just purchased.

Any suggestions would be appreciated!

Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
2,076 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SadiqhAhmed-MSFT 38,551 Reputation points Microsoft Employee
    2021-03-10T19:20:00.06+00:00

    @DANIEL LU Appreciate your patience in this matter!

    Yes – this is kind of by design/known limitation where the usage-charges for a new minted subscription does not flow – as there are no actual usage-charges and associated system setup+propagation delays . You could query for the usage details at a higher scope like at Billing Account and Billing Profile – that’ll pull in all the subscriptions usage charges (including the newly minted ones – when they are available). Would this work for you?

    Also - Can you please clarify which API you are using here?

    Hope this clarifies your question!

    ----------------------------------------------------------------------------------------------------------------------

    If the response helped, do "Accept Answer" and up-vote it