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 unbilled Azure usage data for a specific billing period and currency.
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.
The billing period for the export data. Possible values are: current, last, unknownFutureValue. Choose current for the current billing period and last for the last billing period. Required.
currencyCode
String
The currency code for the partner billing. Required.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Reports.Partners.Billing.Usage.Unbilled.MicrosoftGraphPartnersBillingExport;
using Microsoft.Graph.Beta.Models.Partners.Billing;
var requestBody = new ExportPostRequestBody
{
CurrencyCode = "USD",
AttributeSet = AttributeSet.Full,
BillingPeriod = BillingPeriod.Current,
};
// 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.Usage.Unbilled.MicrosoftGraphPartnersBillingExport.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// 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()
currencyCode := "USD"
requestBody.SetCurrencyCode(¤cyCode)
attributeSet := graphmodels.FULL_ATTRIBUTESET
requestBody.SetAttributeSet(&attributeSet)
billingPeriod := graphmodels.CURRENT_BILLINGPERIOD
requestBody.SetBillingPeriod(&billingPeriod)
// 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().Usage().Unbilled().MicrosoftGraphPartnersBillingExport().Post(context.Background(), requestBody, nil)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// 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.usage.unbilled.microsoftgraphpartnersbillingexport.ExportPostRequestBody exportPostRequestBody = new com.microsoft.graph.beta.reports.partners.billing.usage.unbilled.microsoftgraphpartnersbillingexport.ExportPostRequestBody();
exportPostRequestBody.setCurrencyCode("USD");
exportPostRequestBody.setAttributeSet(com.microsoft.graph.beta.models.partners.billing.AttributeSet.Full);
exportPostRequestBody.setBillingPeriod(com.microsoft.graph.beta.models.partners.billing.BillingPeriod.Current);
var result = graphClient.reports().partners().billing().usage().unbilled().microsoftGraphPartnersBillingExport().post(exportPostRequestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Reports\Partners\Billing\Usage\Unbilled\MicrosoftGraphPartnersBillingExport\ExportPostRequestBody;
use Microsoft\Graph\Beta\Generated\Models\Partners\Billing\AttributeSet;
use Microsoft\Graph\Beta\Generated\Models\Partners\Billing\BillingPeriod;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ExportPostRequestBody();
$requestBody->setCurrencyCode('USD');
$requestBody->setAttributeSet(new AttributeSet('full'));
$requestBody->setBillingPeriod(new BillingPeriod('current'));
$result = $graphServiceClient->reports()->partners()->billing()->usage()->unbilled()->microsoftGraphPartnersBillingExport()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
# 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.usage.unbilled.microsoft_graph_partners_billing_export.export_post_request_body import ExportPostRequestBody
from msgraph_beta.generated.models.attribute_set import AttributeSet
from msgraph_beta.generated.models.billing_period import BillingPeriod
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ExportPostRequestBody(
currency_code = "USD",
attribute_set = AttributeSet.Full,
billing_period = BillingPeriod.Current,
)
result = await graph_client.reports.partners.billing.usage.unbilled.microsoft_graph_partners_billing_export.post(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.