Get License Consumption Report

Prev Next

Retrieves license consumption and utilization details for a specific customer tenant. The API returns purchased, assigned, available, and total license counts for each subscribed product, helping partners monitor license allocation and identify unused licenses across a customer's Microsoft tenant.

Endpoint

{{apiUrl}}/api/licenseConsumptionReport/customer/{{customerId}}/tenant/{{tenantId}}

Endpoint Parameters

ParameterRequiredDescription
{{apiUrl}}YesC3 Portal API URL.
{{customerId}}YesUnique customer identifier generated by C3.
{{tenantId}}YesMicrosoft Entra ID tenant identifier associated with the customer.

Example Workflow

This API requires both the C3 Customer ID and Microsoft Tenant ID. These values can be obtained using the Get Active Customers Details API.

Request Headers

HeaderValue
AuthorizationBearer <access_token>
Content-Typeapplication/json

Request Body

No request body is required for this endpoint.

Successful Response

A successful request returns license utilization details for all subscribed products within the specified tenant, including allocated, consumed, and available licenses.

Sample Response

{
  "OperationType": null,
  "Status": "Success",
  "RequestCorrelationID": "da879f7a-732a-4045-84bb-b1777a1ffc3c",
  "ErrorMessage": null,
  "ErrorDetail": null,
  "Data": [
    {
      "ActiveUnits": 65,
      "AvailableUnits": 5,
      "TotalUnits": 65,
      "ProductName": "Office 365 G1 GCC",
      "ProductSkuId": "3f4babde-90ec-47c6-995d-d223749065d1",
      "ConsumedUnits": 60,
      "SubscriptionNames": "Office 365 G1 GCC (Monthly)"
    }
  ]
}

Response Properties

PropertyDescription
OperationTypeReserved for internal use. Can be ignored.
StatusIndicates the status of the request. Possible values: Success, Error.
RequestCorrelationIDUnique identifier generated by C3 for request tracking and troubleshooting.
ErrorMessageError message returned if request processing fails.
ErrorDetailAdditional error information.
DataCollection of license consumption records.

License Consumption Attributes

AttributeDescription
ActiveUnitsTotal licenses purchased through the partner relationship.
AvailableUnitsUnassigned licenses currently available for allocation.
TotalUnitsTotal licenses available within the customer tenant across all authorized CSP relationships.
ProductNameName of the subscribed product or service.
ProductSkuIdUnique SKU identifier associated with the product.
ConsumedUnitsNumber of licenses currently assigned to users.
SubscriptionNamesSubscription name including billing frequency information.

Error Response

The API validates the supplied Customer ID and Tenant ID. If either value is invalid, the API returns a 400 Bad Request response containing validation details.

Sample Error Response

{
  "OperationType": null,
  "Status": "Error",
  "RequestCorrelationID": "e002cf54-bbaf-4838-8a66-f016c70c907a",
  "ErrorMessage": "ERROR_DESC_BAD_INPUT",
  "ErrorDetail": "ERROR_DESC_BAD_INPUT",
  "Data": [
    {
      "Attribute": "CustomerId",
      "AttributeKey": "CUSTOMER_C3ID",
      "Message": "INVALID_C3_CUSTOMER_ID",
      "DefaultMessage": "Invalid C3 Customer ID",
      "Value": "9582D9F2-1234945-AB56-DADED948C1C4"
    },
    {
      "Attribute": "TenantId",
      "AttributeKey": "TENANT_ID",
      "Message": "INVALID_TENANT_ID",
      "DefaultMessage": "Invalid Tenant ID",
      "Value": "0f96f6b1-fe7f-4322-567-152d0f2ff171"
    }
  ]
}

Error Response Properties

PropertyDescription
OperationTypeReserved for internal use. Can be ignored.
StatusIndicates the status of the request. Possible values: Success, Error.
RequestCorrelationIDUnique identifier generated by C3 for troubleshooting purposes.
ErrorMessageHigh-level error message.
ErrorDetailAdditional error details.
DataCollection of validation errors.

Validation Error Attributes

AttributeDescription
AttributeName of the invalid request parameter.
AttributeKeyInternal system identifier for the parameter.
MessageError code describing the validation failure.
DefaultMessageUser-friendly description of the validation error.
ValueValue supplied in the request.