429 Too many requests when using Azure Cost Management API

Ingrid Finnoy 5 Reputation points Microsoft Employee
2024-02-29T08:37:38.5166667+00:00

I am using the API as a grafana datasource to get an overview of our costs. Half of the time the panels in my dashboard does not show any data because of rate limiting: "429 Too many requests".

I have researched other similar questions: https://learn.microsoft.com/en-us/answers/questions/1340993/exception-429-too-many-requests-for-azure-cost-man?source=docs

The recommended solution here (“ClientType” : “AwesomeType”) does not work for me. There is also some discussion in the comment section about using "x-ms-command-name" in the header, but this does not seem to work either. Looks like this
Internal limits
o 4 calls per minute per scope
o 20 calls per minute per tenant
o 2000 calls per minute per ClientType
is the root of my problem, because I have more than more than 4 calls per minute per scope (subscription). Is there any way around this?

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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.