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.
Read the properties and relationships of an operation object.
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
GET /reports/partners/billing/operations/{id}
Optional query parameters
This method doesn't support any OData query parameters to help customize the response. For general information, see OData query parameters.
Request body
Don't supply a request body for this method.
Response
If an operation completes successfully, this method returns a 200 OK
response code and a microsoft.graph.partners.billing.exportSuccessOperation object in the response body. The resourceLocation navigation property in the response body represents the microsoft.graph.partners.billing.manifest resource for the operation.
If an operation fails, this method returns a 200 OK
response code and a microsoft.graph.partners.billing.failedOperation object in the response body.
If an operation is still running, this method returns a 200 OK
response code and a microsoft.graph.partners.billing.runningOperation object in the response body.
Examples
Example 1: Get operation succeeded
Request
The following example shows a request that returns a microsoft.graph.partners.billing.exportSuccessOperation object.
GET https://graph.microsoft.com/beta/reports/partners/billing/operations/6fe687d7-1e0f-4bd6-9091-4672691f64bc
// Code snippets are only available for the latest version. Current version is 5.x
// 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.Operations["{operation-id}"].GetAsync();
// 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"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
operations, err := graphClient.Reports().Partners().Billing().Operations().ByOperationId("operation-id").Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.partners.billing.Operation result = graphClient.reports().partners().billing().operations().byOperationId("{operation-id}").get();
const options = {
authProvider,
};
const client = Client.init(options);
let operation = await client.api('/reports/partners/billing/operations/6fe687d7-1e0f-4bd6-9091-4672691f64bc')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->reports()->partners()->billing()->operations()->byOperationId('operation-id')->get()->wait();
Import-Module Microsoft.Graph.Beta.Reports
Get-MgBetaReportPartnerBillingOperation -OperationId $operationId
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.reports.partners.billing.operations.by_operation_id('operation-id').get()
Response
The following example shows the response for an operation that completed successfully.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.partners.billing.exportSuccessOperation",
"id": "6fe687d7-1e0f-4bd6-9091-4672691f64bc",
"status": "succeeded",
"createdDateTime": "2023-03-09T08:12:53",
"lastActionDateTime": "2023-03-09T08:37:48.5046691Z",
"resourceLocation@odata.navigationLink": "https://graph.microsoft.com/beta/reports/partners/billing/manifests/8fe347d7-1e0f-4bd6-9091-4672691f32db"
}
Example 2: Get operation failed
Request
The following example shows a request that returns a microsoft.graph.partners.billing.failedOperation object.
GET https://graph.microsoft.com/beta/reports/partners/billing/operations/6fe687d7-1e0f-4bd6-9091-4672691f64bc
// Code snippets are only available for the latest version. Current version is 5.x
// 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.Operations["{operation-id}"].GetAsync();
// 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"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
operations, err := graphClient.Reports().Partners().Billing().Operations().ByOperationId("operation-id").Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.partners.billing.Operation result = graphClient.reports().partners().billing().operations().byOperationId("{operation-id}").get();
const options = {
authProvider,
};
const client = Client.init(options);
let operation = await client.api('/reports/partners/billing/operations/6fe687d7-1e0f-4bd6-9091-4672691f64bc')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->reports()->partners()->billing()->operations()->byOperationId('operation-id')->get()->wait();
Import-Module Microsoft.Graph.Beta.Reports
Get-MgBetaReportPartnerBillingOperation -OperationId $operationId
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.reports.partners.billing.operations.by_operation_id('operation-id').get()
Response
The following example shows the response for an operation that failed.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.partners.billing.failedOperation",
"id": "6fe687d7-1e0f-4bd6-9091-4672691f64bc",
"status": "failed",
"createdDateTime": "2023-03-09T08:12:53",
"lastActionDateTime": "2023-03-09T08:37:48.5046691Z",
"error": {
"message": "No data available",
"code": "5000"
}
}
Example 3: Get operation is still running
Request
The following example shows a request that returns a microsoft.graph.partners.billing.runningOperation object.
GET https://graph.microsoft.com/beta/reports/partners/billing/operations/6fe687d7-1e0f-4bd6-9091-4672691f64bc
// Code snippets are only available for the latest version. Current version is 5.x
// 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.Operations["{operation-id}"].GetAsync();
// 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"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
operations, err := graphClient.Reports().Partners().Billing().Operations().ByOperationId("operation-id").Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.partners.billing.Operation result = graphClient.reports().partners().billing().operations().byOperationId("{operation-id}").get();
const options = {
authProvider,
};
const client = Client.init(options);
let operation = await client.api('/reports/partners/billing/operations/6fe687d7-1e0f-4bd6-9091-4672691f64bc')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->reports()->partners()->billing()->operations()->byOperationId('operation-id')->get()->wait();
Import-Module Microsoft.Graph.Beta.Reports
Get-MgBetaReportPartnerBillingOperation -OperationId $operationId
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.reports.partners.billing.operations.by_operation_id('operation-id').get()
Response
The following example shows the response for an operation that is still running.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.partners.billing.runningOperation",
"id": "6fe687d7-1e0f-4bd6-9091-4672691f64bc",
"status": "running",
"createdDateTime": "2023-03-09T08:12:53",
"lastActionDateTime": "2023-03-09T08:37:48.5046691Z"
}