Open RaniLinkov opened 6 months ago
Hi @RaniLinkov , this may be due to lack of permission. See https://github.com/Azure/azure-rest-api-specs/issues/21580#issuecomment-1340448613
2019-10-01-preview might not enforce permission on reading while 2020-05 might have. Would you try adding sufficient role/permission to your service principal and try again?(Billing Reader role may not be enough, you may need Account Administrator role as the comment above implies)
Link to sample
https://learn.microsoft.com/en-us/rest/api/billing/billing-accounts/list?view=rest-billing-2020-05-01&viewFallbackFrom=rest-billing-2021-10-01
Library name and version
com.azure.resourcemanager:azure-resourcemanager-billing:1.0.0-beta.3
Language of the Sample
Sample Issue Type
Issue details
Getting empty billing account list when using api version 2020-05-01, both using REST and the billing sdk.
Able to retrieve account list using version 2019-10-01-preview.
Expected behavior
Expecting to get billing account list when using sdk method and\or HTTP endpoint
Actual behavior
Getting empty billing account list
Reproduction Steps
Environment
Java 8 dropwizard