title | description | author | ms.localizationpriority | doc_type | ms.subservice |
---|---|---|---|---|---|
Use the Microsoft Graph API to export partner billing data |
The partner billing API in Microsoft Graph offers Microsoft direct partners a faster, more efficient way to export their high-volume billed and unbilled Azure usage data. |
sourishdeb |
medium |
conceptualPageType |
reports |
[!INCLUDE alerts-callout-csp-partner-only]
As part of the Microsoft Partner Center ecosystem, Microsoft direct partners in the Cloud Solution Provider programs can request to export their billed and unbilled data to Azure Blob Storage asynchronously. This removes the need to maintain an open connection for hours and loop through millions of transactions iteratively. The asynchronous API provides a way to quickly access billing and reconciliation data in manageable chunks.
The partner billing API is defined in the OData subnamespace microsoft.graph.partners.billing
.
Note
Daily-rated usage normally takes 24 hours to appear in the Microsoft Partner Center or to be available through the API.
To export reconciliation data, the calling principal must be in the partner tenant and be granted the appropriate partner billing privilege permissions. The partner billing API supports the following partner permissions.
[!INCLUDE permissions-table]
[!INCLUDE zero-trust]
The partner billing API provides methods and actions that allow Microsoft direct partners to export their high-volume billed reconciliation data and billed and unbilled Azure usage data.
Use case | API |
---|---|
Create a new export operation to export billed usage data | billedUsage: export |
Poll for operation status update | Get operation |
Use case | API |
---|---|
Create a new export operation to export unbilled usage data | unbilledUsage: export |
Poll for operation status update | Get operation |
Use case | API |
---|---|
Create a new export operation to export billed invoice reconciliation data | billedReconciliation: export |
Poll for operation status update | Get operation |
The download of usage or reconciliation data is a long-running operation that consists of the following operations.
Use the billedUsage: export or unbilledUsage: export API to access billed or unbilled consumption line items. The API returns a 202 Accepted
response code and a Location
header that contains the URL to the long-running operation. You can check the status of the long-running operation by making a GET request at regular intervals until you receive a success status with a manifest URL.
Use the billedReconciliation: export API to access billed invoice reconciliation line items. The API returns a 202 Accepted
response code and a Location
header that contains the URL to the long-running operation. You can check the status of the long-running operation by making a GET request at regular intervals until you receive a success status with a manifest URL.
Until you receive the success status, keep polling the Get operation API at regular intervals. If the requested data is unavailable, the API response includes a Retry-After
header that indicates how long you should wait before sending another request. When the operation has completed successfully, the response also provides a manifest with details of the generated files. The manifest provides a storage folder from which actual billing data can be downloaded. The response splits or partitions the files to optimize throughput and I/O parallelism.