question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[QUERY] Issue Retrieving Transactions with Microsoft.Azure.Management.Billing

See original GitHub issue

Library name and version

Microsoft.Azure.Management.Billing

Query/Question

File: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/billing/Microsoft.Azure.Management.Billing/tests/ScenarioTests/TransactionsOperationsTest.cs

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:open
  • Created 2 months ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jsquirecommented, Jul 28, 2023

Thank you for your feedback. Tagging and routing to the team member best able to assist.

0reactions
ArthurMa1978commented, Aug 7, 2023

We need some time to explore the feasibility of launching a new SDK that supports both the old functions and old functions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue Retrieving Transactions with Microsoft.Azure. ...
I'm facing an issue while trying to retrieve transactions using Microsoft.Azure.Management.Billing for a particular account.
Read more >
Manage access to billing information for Azure
Sign in to the Azure portal. · Search on Cost Management + Billing. · If you have access to just one billing scope,...
Read more >
View and download your Azure usage and charges
Learn how to download or view your Azure daily usage and charges, and see other available resources.
Read more >
View your Azure usage summary details and download ...
Search for Cost Management + Billing and then select it. ... In the Azure portal, navigate to Reservation Transactions. Sum all the refunds....
Read more >
Cost Management + Billing frequently asked questions (FAQ)
In the Azure portal, navigate Cost Management + Billing > Cost Management > Cost analysis. Select Cost by service and then group by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found