Azure / Azure/azure-rest-api-specs-examples

"Billing Accounts - List" returns empty list for api version 2020-05-01

Open
#4,364 1 comment 0 reactions 1 assignee Claimed by @XiaofeiCao View on GitHub
customer-reported question
Dominant language
No language data
Stars
40
Forks
23
Avg merge
23h 36m
Merged PRs (30d)
172

Description

### 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

- [ ] C#/.NET
- [X] Java
- [ ] JavaScript/TypedScript
- [ ] Python
- [ ] Golang
- [ ] Other - Please specify in Issue details field

### Sample Issue Type

- [X] Sample not working
- [ ] Sample missing
- [ ] Do not understand sample

### 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

```
TokenCredential credential = new ClientSecretCredentialBuilder().clientId(credentials.getClientId())
.clientSecret(credentials.getClientSecret())
.tenantId(credentials.getTenantId())
.build();

AzureProfile profile = new AzureProfile(credentials.getTenantId(), null, AzureEnvironment.AZURE);

BillingManager billingManager = BillingManager.authenticate(credential, profile);

retVal = billingManager.billingAccounts().list().stream().collect(Collectors.toList());
```

### Environment

Java 8 dropwizard

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.