Thanks in advance :) I performed a request of this (https://learn.microsoft.com/en-us/rest/api/billing/2019-10-01-preview/invoices/list-by-billing-subscription#code-try-0) with these parameters and it is answered 404. Can anyone give me a clue about what I am doing wrong? I am performing it with my user who is the owner of this personal account. Also, we performed this in a business account because we know this info is not available to every subscription. We performed this with an user who has billing reader permissions but it also gives 404.
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/invoices?api-version=2019-10-01-preview&periodEndDate=2022-06-01&periodStartDate=2022-06-30
cache-control: no-cache
content-length: 0
date: Fri, 24 Jun 2022 09:31:35 GMT
expires: -1
mise-correlation-id: de3c5cae-0644-43c1-9941-dd675e595f2a
pragma: no-cache
x-frame-options: DENY
x-ms-correlation-request-id: b4d8cb29-13e9-4795-b17b-8d0eafea4d3e
x-ms-ratelimit-remaining-tenant-reads: 11994
x-ms-request-id: b4d8cb29-13e9-4795-b17b-8d0eafea4d3e
x-ms-routing-request-id: FRANCECENTRAL:20220624T093135Z:b4d8cb29-13e9-4795-b17b-8d0eafea4d3e
x-ms-service-version: 10.6.1992.510
Why the request of Invoices - List By Billing Subscription in Azure through the "try it" gives a 404?
Navigate to Azure Portal => Azure Active Directory => Roles and administrators
Navigate to the Azure portal => Your Resource Group => Access Control (IAM)
Check whether you can give access to the Invoice
For the APIs to have access to the invoice data, we must grant them permissions via the Azure portal. Navigate to Azure Portal => Cost Management + Billing=> Your Subscription => Invoices =>Access to invoice => Select On => Save