Get a subscription's resource usage information

Applies To

  • Partner Center
  • Partner Center for Microsoft Cloud Germany
  • Partner Center for Microsoft Cloud for US Government

Gets a collection of AzureResourceMonthlyUsageRecord resources representing a list of services within a customer's subscription and their associated rated usage information.


  • Credentials as described in Partner Center authentication. This scenario supports authentication with both standalone App and App+User credentials.
  • A customer ID (customer-tenant-id). If you do not have a customer's ID, you can look up the ID in Partner Center by choosing the customer from the customers list, selecting Account, then saving their Microsoft ID.
  • A subscription ID.


To get a subscription's resource usage information, use your IAggregatePartner.Customers collection and call the ById() method. Then call the Subscriptions property, as well as UsageRecords, then the Resources property. Finish by calling the Get() or GetAsync() methods.

// IAggregatePartner partnerOperations;
// var selectedCustomerId as string;
// var selectedSubscriptionID as string;

var usageRecords = partnerOperations.Customers.ById(selectedCustomerId).Subscriptions.ById(selectedSubscriptionId).UsageRecords.Resources.Get();

Sample: Console test app. Project: PartnerSDK.FeatureSample Class: SubscriptionResourceUsageRecords.cs

REST Request

Request syntax

Method Request URI
GET {baseURL}/v1/customers/{customer-tenant-id}/subscriptions/{id-for-subscription}/usagerecords/resources HTTP/1.1

URI parameter

This table lists the required query parameter to get the rated usage information.

Name Type Required Description
customer-tenant-id guid Y A GUID corresponding to the customer.
id-for-subscription guid Y A GUID corresponding to the subscription.

Request headers

  • See Headers for more information.

Request body


Request example

GET{customer-tenant-id}/subscriptions/{id-for-subscription}/usagerecords/resources HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 65b26053-37d0-4303-9fd1-46ad8012bcb6
MS-CorrelationId: 47c36033-af5d-4457-80a4-512c1626fac4

REST Response

If successful, this method returns a collection of AzureResourceMonthlyUsageRecord resources in the response body.

Response success and error codes

Each response comes with an HTTP status code that indicates success or failure and additional debugging information. Use a network trace tool to read this code, error type, and additional parameters. For the full list, see Error Codes.

Response example

HTTP/1.1 200 OK
Content-Length: 12014
Content-Type: application/json
MS-CorrelationId: 648a26a4-a63e-459f-844b-4f29d7913353
MS-RequestId: be82a8ba-4a53-49f7-8313-b033c058687e
Date: Tue, 10 Nov 2015 19:09:59 GMT

        "subcategory":"LOCALLY REDUNDANT",
        "name":"Azure Resource 1",
        "category":"Remote App",
        "subcategory":"Remote App",
        "name":"Azure Resource 2",