Namespace: microsoft.graph.partners.billing
Important
APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
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.
Export the billed invoice reconciliation data.
This API is available in the following national cloud deployments.
Global service |
US Government L4 |
US Government L5 (DOD) |
China operated by 21Vianet |
✅ |
❌ |
❌ |
❌ |
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type |
Least privileged permissions |
Higher privileged permissions |
Delegated (work or school account) |
PartnerBilling.Read.All |
Not available. |
Delegated (personal Microsoft account) |
Not supported. |
Not supported. |
Application |
PartnerBilling.Read.All |
Not available. |
HTTP request
POST /reports/partners/billing/reconciliation/billed/export
Request body
In the request body, supply a JSON representation of the parameters.
The following table shows the parameters that you can use with this action.
Parameter |
Type |
Description |
attributeSet |
microsoft.graph.partners.billing.attributeSet |
Attributes that should be exported. Possible values are: full , basic , unknownFutureValue . The default value is full . Choose full for a complete response or basic for a subset of attributes. Optional. |
invoiceId |
String |
The invoice ID for which the partner requested to export data. Required. |
Response
If successful, this method 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 to this URL that returns one of the following objects in the response body: microsoft.graph.partners.billing.runningOperation, microsoft.graph.partners.billing.exportSuccessOperation, or microsoft.graph.partners.billing.failedOperation.
Examples
Request
The following example shows a request.
POST https://graph.microsoft.com/beta/reports/partners/billing/reconciliation/billed/export
Content-Type: application/json
{
"invoiceId": "G016907411",
"attributeSet": "full"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Reports.Partners.Billing.Reconciliation.Billed.MicrosoftGraphPartnersBillingExport;
using Microsoft.Graph.Beta.Models.Partners.Billing;
var requestBody = new ExportPostRequestBody
{
InvoiceId = "G016907411",
AttributeSet = AttributeSet.Full,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Reports.Partners.Billing.Reconciliation.Billed.MicrosoftGraphPartnersBillingExport.PostAsync(requestBody);
mgc-beta reports partners billing reconciliation billed microsoft-graph-partners-billing-export post --body '{\
"invoiceId": "G016907411",\
"attributeSet": "full"\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphreports "github.com/microsoftgraph/msgraph-beta-sdk-go/reports"
graphmodelspartnersbilling "github.com/microsoftgraph/msgraph-beta-sdk-go/models/partners/billing"
//other-imports
)
requestBody := graphreports.NewExportPostRequestBody()
invoiceId := "G016907411"
requestBody.SetInvoiceId(&invoiceId)
attributeSet := graphmodels.FULL_ATTRIBUTESET
requestBody.SetAttributeSet(&attributeSet)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
microsoftGraphPartnersBillingExport, err := graphClient.Reports().Partners().Billing().Reconciliation().Billed().MicrosoftGraphPartnersBillingExport().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.reports.partners.billing.reconciliation.billed.microsoftgraphpartnersbillingexport.ExportPostRequestBody exportPostRequestBody = new com.microsoft.graph.beta.reports.partners.billing.reconciliation.billed.microsoftgraphpartnersbillingexport.ExportPostRequestBody();
exportPostRequestBody.setInvoiceId("G016907411");
exportPostRequestBody.setAttributeSet(com.microsoft.graph.beta.models.partners.billing.AttributeSet.Full);
var result = graphClient.reports().partners().billing().reconciliation().billed().microsoftGraphPartnersBillingExport().post(exportPostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const operation = {
invoiceId: 'G016907411',
attributeSet: 'full'
};
await client.api('/reports/partners/billing/reconciliation/billed/export')
.version('beta')
.post(operation);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Reports\Partners\Billing\Reconciliation\Billed\MicrosoftGraphPartnersBillingExport\ExportPostRequestBody;
use Microsoft\Graph\Beta\Generated\Models\Partners\Billing\AttributeSet;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ExportPostRequestBody();
$requestBody->setInvoiceId('G016907411');
$requestBody->setAttributeSet(new AttributeSet('full'));
$result = $graphServiceClient->reports()->partners()->billing()->reconciliation()->billed()->microsoftGraphPartnersBillingExport()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Reports
$params = @{
invoiceId = "G016907411"
attributeSet = "full"
}
Export-MgBetaReportPartnerBillingReconciliationBilled -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.reports.partners.billing.reconciliation.billed.microsoft_graph_partners_billing_export.export_post_request_body import ExportPostRequestBody
from msgraph_beta.generated.models.attribute_set import AttributeSet
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ExportPostRequestBody(
invoice_id = "G016907411",
attribute_set = AttributeSet.Full,
)
result = await graph_client.reports.partners.billing.reconciliation.billed.microsoft_graph_partners_billing_export.post(request_body)
Response
The following example shows the response.
HTTP/1.1 202 Accepted
Location: https://graph.microsoft.com/beta/reports/partners/billing/operations/9ab9cb54-d07f-4f52-9ea6-a09d7de52c14