Use the partner billing API in Microsoft Graph to access billing data

Note

This API is available for Cloud Solution Provider (CSP) partners only to access their billed and unbilled reconciliation data for a tenant. To learn more about the CSP program, see Microsoft Cloud Solution Provider.

The partner billing API in Microsoft Graph allow Microsoft direct partners in the Cloud Solution Provider programs to export their high-volume billed and unbilled data asynchronously. This removes the need to maintain an open connection for hours and loop through millions of transactions iteratively. Asynchronous APIs enable fast, efficient retrieval of billing and reconciliation data in manageable chunks for quicker reconciliation.

Why use the partner billing API?

The partner billing API uses valet key and asynchronous request-reply patterns to optimize the efficiency and deliver results asynchronously. API responses contain a token that provides access to reconciliation data, including either all attributes or a selected subset.

The partner billing API provides the following advantages:

  • Faster download and processing speed
  • Optimized response payload size and retrieval time when the basic set of attributes from the reconciliation data is selected
  • Delivered the response as a single Azure blob, without the need for iterative data retrieval with 2000 transactions per call
  • Improved access speed by splitting the blobs into manageable chunks
  • No changes are required to the existing data models

Sequence diagram

The following diagram shows the steps needed to download reconciliation data.

Export data sequence diagram

To access the usage data asynchronously, use the following steps with the API endpoints.

1. Usage line-item endpoint

  • Retrieve the billed or unbilled usage line items.
  • Receive a 202 Accepted response code and a URL in the response body to check the status of the operation.

2. Operation status endpoint

Use the Get operation endpoint to poll the URL repeatedly until the manifest is returned.

API reference

Looking for the API reference for this service?

Next steps