I am using the Azure Invoice API which has asks for the following parameters https://management.azure.com/providers/Microsoft.Billing/billingAccounts/**{billingAccountName}**/billingProfiles/**{billingProfileName}**/invoices/**{invoiceName}**?api-version=2019-10-01-preview
but after having all the parameters and running my Python code, I am facing an error which is defined below:
{'code': 'NotFound', 'message': 'The resource or one of its dependencies could not be found.'}
and I have given the Billing reader access to the Service Principle that I am using for generating access token. Is there anything required other than this role for reading Billing data of Azure? Is there a possibility that I am entering wrong parameters?
We are expecting to get the invoice data for Azure.
The above error occurs maybe you have passed incorrect parameters, incorrect permissions, or issues with the API itself.
You can use the below Python code to fetch invoice details from a user with
billing readerrole. it supports only users and groups to get the info of invoice details.Portal:
Roles:
Code:
Output:
Reference: