canonical: https://jentic.com/apis/azure.com/usagemanagementclient

# Microsoft Azure UsageManagementClient

Jentic publishes the only available OpenAPI specification for UsageManagementClient, keeping it validated and agent-ready. The Microsoft.Commerce Usage Management Client returns Azure billing telemetry - RateCard data describing the meter catalog and prices for an offer in a region and currency, plus UsageAggregates time-bucketed metered usage for a subscription. Agents use it to forecast cloud spend, attribute costs to resource groups, and feed cost figures into FinOps dashboards. Authentication is Azure Active Directory OAuth 2.0 on management.azure.com.

## For AI agents

Pulls Azure RateCard pricing for an offer and time-bucketed UsageAggregates so agents can build cost reports, forecast spend, and feed FinOps dashboards.

## Scope

Does not produce invoices, manage budgets, or expose marketplace charges - use the Billing, Cost Management, and Consumption APIs for those; this client only returns RateCard pricing and UsageAggregates rows.

## Capabilities

- Retrieve the RateCard for an Azure offer (e.g., MS-AZR-0003P) in a chosen region and currency to know the unit price of every meter
- Pull UsageAggregates for a subscription bucketed hourly or daily to show metered consumption across resource groups and meters
- Filter UsageAggregates by reportedStartTime and reportedEndTime to align cost telemetry with a custom billing period
- Combine RateCard prices with UsageAggregates quantities to compute estimated cost per resource group, tag, or meter
- Feed Azure cost figures into a FinOps dashboard that correlates spend with deployment activity by querying both endpoints in tandem

## Use cases

### Daily Azure cost report

Finance teams need a daily report showing yesterday's Azure spend per subscription with a breakdown by meter category. The agent queries UsageAggregates with aggregationGranularity=Daily and the prior day's window, then joins each row's meterId with the RateCard prices to compute cost = quantity x unit-price. Output is suitable for direct ingest into a BI tool or Slack summary.

Example prompt: Call GET /subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates with reportedStartTime=2026-06-09T00:00:00Z, reportedEndTime=2026-06-10T00:00:00Z, aggregationGranularity=Daily; join with the RateCard for offer MS-AZR-0003P in USD; emit a CSV with columns meterCategory, quantity, unitPrice, costUSD.

### Pricing snapshot for forecasting

Capacity planners forecasting next-quarter spend need a stable price reference. The agent calls the RateCard endpoint once for the relevant offer/currency/region/locale combination and caches the meter list and prices. Forecasted resource counts multiplied by these unit prices produce a forward cost estimate that the team can compare against a budget.

Example prompt: Call GET /subscriptions/{subscriptionId}/providers/Microsoft.Commerce/RateCard with $filter=OfferDurableId eq 'MS-AZR-0003P' and Currency eq 'USD' and Locale eq 'en-US' and RegionInfo eq 'US' and store the resulting Meters array as the forecast price baseline.

### Tag-based cost attribution

An agent supporting a FinOps team needs to attribute Azure cost to engineering tags such as environment or project. UsageAggregates exposes instanceData containing tags, so the agent groups quantities by tag value, joins to RateCard prices, and produces a per-tag cost roll-up. The same logic supports resource-group-level chargeback.

Example prompt: Pull UsageAggregates for subscription SUB123 over the last 7 days hourly, parse instanceData.tags.environment, group quantities by environment value, multiply by the matching RateCard meter price, and return a JSON map of environment to cost.

### Agent-driven cost summary via Jentic

An ops agent answering 'what did we spend on Azure yesterday?' can combine RateCard and UsageAggregates through Jentic without writing a custom Azure SDK script. Jentic exposes both operations as searchable tools with their input schemas; the agent calls them in sequence and reduces the result to a one-line summary. Credentials remain in the vault.

Example prompt: Search Jentic for 'azure usage aggregates', execute for the prior day with subscriptionId=SUB123 and aggregationGranularity=Daily, then for the same period fetch the RateCard and reply with 'Azure spend yesterday: $X across N resource groups'.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /subscriptions/{subscriptionId}/providers/Microsoft.Commerce/RateCard | Retrieve the RateCard pricing for an offer, currency, locale, and region |
| GET | /subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates | Pull metered usage aggregates over a time window |

## Key resources

- **RateCard** — Meter catalog with unit prices for an Azure offer in a chosen currency, locale, and region
- **UsageAggregates** — Time-bucketed metered usage for a subscription, with optional instance-level tags and properties

## Why Jentic

- **Setup:** Wiring UsageManagementClient by hand means setting up Azure AD OAuth 2.0 against management.azure.com, pinning the 2015-06-01-preview api-version, assembling the OData $filter for RateCard, and paging UsageAggregates with ARM 429 back-off yourself before you get a single cost figure. Through Jentic you install once, import UsageManagementClient from the API Directory, store the Azure AD OAuth token once, and your agent calls it.
- **Permission scoping:** The subscription id is a URL path parameter (/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/RateCard and .../UsageAggregates), and both operations are read-only billing reads. You choose the operations it may call, so you can limit the agent to pulling RateCard pricing and UsageAggregates for one subscription and nothing that writes.
- **Credential handling:** Your Azure AD OAuth token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'pull Azure usage aggregates for last month' or 'get the RateCard pricing for an Azure offer', and Jentic returns the matching Microsoft.Commerce operation with its $filter and time-window parameters declared so the agent calls it without reading the ARM reference.

## Related APIs

- **ConsumptionManagementClient** — Newer Azure consumption and cost API with richer dimensions (tags, charges, budgets)
- **CommerceManagementClient** — Sibling Microsoft.Commerce API exposing additional billing operations
- **ComputeManagementClient** — Lists VMs whose meters appear in UsageAggregates

## FAQ

### Why is there no official OpenAPI spec for UsageManagementClient?

Microsoft Azure does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call UsageManagementClient via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer .

### What authentication does the UsageManagementClient use?

Azure Active Directory OAuth 2.0 against https://login.microsoftonline.com/common/oauth2/authorize. Through Jentic, the AAD client secret stays encrypted in the vault and a scoped bearer token is issued to the agent at call time, so the secret never enters agent context.

### Can I get hourly Azure usage with the UsageManagementClient?

Yes. GET /subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates with aggregationGranularity=Hourly and a reportedStartTime/reportedEndTime window returns hourly buckets. Use Daily for daily granularity instead.

### What are the rate limits for the UsageManagementClient?

Calls go through Azure Resource Manager and the Microsoft.Commerce provider, subject to the standard ARM read throttling envelope (roughly 12,000 reads per hour per subscription). The exact Commerce-specific limit is not declared in the spec; respect Retry-After on 429.

### How do I pull a RateCard through Jentic?

Run pip install jentic, then client.search('azure ratecard pricing'), client.load on the returned GET on /Microsoft.Commerce/RateCard, and client.execute with $filter set to the offer, currency, locale and region you need. Jentic injects the AAD bearer token and returns the parsed meter catalog.

### Does the UsageManagementClient support EA or CSP agreements?

RateCard is offer-scoped - pass the appropriate OfferDurableId in $filter (for example, the EA offer for an Enterprise Agreement). UsageAggregates returns metered usage for whatever subscription you query, regardless of agreement type, but EA and CSP customers may also use the Consumption and Cost Management APIs for richer reporting.

### Can I limit what my agent is allowed to do with the Microsoft Azure Usage Management API?

Yes. Jentic One is self-hosted, so your own rules decide which operations and credentials the agent may use. You can allow only the two read-only billing reads, GET RateCard for offer pricing and GET UsageAggregates for metered usage, and nothing that writes. Because the subscription id is a URL path parameter, you can also scope the agent to a single subscription and the Azure AD OAuth token you store, so it cannot reach billing data for any other account.
