Cost Details Report Generation from API Returning Different Columns

Wyatt Scott 0 Reputation points
2024-02-07T16:24:39+00:00

Hello, I am building an application for tracking cost details by unique records, with the azure cost management API. Specifically, I am using "generateCostDetailsReport?api-version=2023-11-01" in the post request to generate the cost details report. When retrieving the report from the response, I noticed that the column names are not the same as the documentation, which is an issue since the returned file is missing one of the unique record keys, ProductID. The documentation here: https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields lists that the ProductID field should be present, but the columns I get returned in the report are: InvoiceSectionName, AccountName, AccountOwnerId, SubscriptionId, SubscriptionName, ResourceGroup, ResourceLocation, Date, ProductName, MeterCategory, MeterSubCategory, MeterId, MeterName, MeterRegion, UnitOfMeasure, Quantity, EffectivePrice, CostInBillingCurrency, CostCenter, ConsumedService, ResourceId, Tags, OfferId, AdditionalInfo, ServiceInfo1, ServiceInfo2, ResourceName, ReservationId, ReservationName, UnitPrice, ProductOrderId, ProductOrderName, Term, PublisherType, PublisherName, ChargeType, Frequency, PricingModel, AvailabilityZone, BillingAccountId, BillingAccountName, BillingCurrencyCode, BillingPeriodStartDate, BillingPeriodEndDate, BillingProfileId, BillingProfileName, InvoiceSectionId, IsAzureCreditEligible, PartNumber, PayGPrice, PlanName, ServiceFamily, CostAllocationRuleName, benefitId, benefitName How can this be?

Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
2,355 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SadiqhAhmed-MSFT 41,721 Reputation points Microsoft Employee
    2024-02-08T20:32:16.99+00:00

    @Wyatt Scott Thank you for posting your question on the Microsoft Q&A platform. Happy to help!

    From the details you shared above, I understand that you are developing an application for tracking cost details by unique records, with the azure cost management API. You observed that the column names are not the same as the documentation,

    As per this doc https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields the ProductId is only available for MCA agreement type.

    With the available column you are getting, you are using EA agreement which does not have Productid

    Hope this answers your questions! Let us know if you have any further questions.


    If the response helped, do "Accept Answer" and up-vote it . 

    0 comments No comments