[QUERY] Issue Retrieving Transactions with Microsoft.Azure.Management.Billing
See original GitHub issueLibrary name and version
Microsoft.Azure.Management.Billing
Query/Question
Line no 36:
// Get the transactions
var transactions = billingMgmtClient.Transactions.ListByInvoice(BillingAccountName, InvoiceId);
I am experiencing an issue while attempting to retrieve transactions using Microsoft.Azure.Management.Billing for a particular account. The transactions and account queries are returning empty results, whereas the invoice query returns a full result.
This specific subscription is registered under both the Legacy MOSP (Microsoft Online Subscription Program) contract and the MCA (Microsoft Customer Agreement) modern contract. The billing account ID format for this account is ‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,’ and it has multiple subscriptions attached to it. Despite trying, I failed to retrieve transaction and billing account information for this account. However, I have successfully retrieved invoice information using the below code.
Success
var billingClient = new BillingManagementClient(serviceCreds);
billingClient.SubscriptionId = "xxxxxxxx-cccc-cccc-cccc-xxxxxxxxxxxx";
var invoice = billingClient.Invoices.GetById("E0500O0000");
Failed (Empty result)
var content = billingClient.Transactions.ListByInvoice(billingAccountName: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", invoice.Name);
On the other hand, I also have another account under the ‘Microsoft Customer Agreement,’ but with a different account ID format: ‘yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx_2019-05-31.’ Interestingly, I can successfully retrieve transaction data for this account using the same code."
Environment
Windows 11 Visual Studio Code 1.80.1
Issue Analytics
- State:
- Created 2 months ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Thank you for your feedback. Tagging and routing to the team member best able to assist.
We need some time to explore the feasibility of launching a new SDK that supports both the old functions and old functions.