How does --billing-account actually work?
My billing account id is alpha numeric as per https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/view-all-accounts
The variable used is an integer? public int? BillingAccountId { get; set; }
Perhaps we are not talking about the same billing account id?
Thanks,
Daniel
Thanks for opening your first issue! Reports like these help improve the project!
If it only supports numeric billing accounts, then this is probably designed for EA accounts, which have numeric IDs. MCA accounts have more complex strings.
In theory, this should be a fairly simple change to support a string, but please do note that some dimensions in Query API are different between EA and MCA.
The tool does not yet take MCA accounts into account. Which is tricky, as I do not have access to such an account and need to see how I can support the multiple types of accounts.
@mivano are you discovering dimensions from the Dimensions API or do you have them hard-coded? If you discover, then switching to MCA should be as simple as supporting any scope. The dimensions are different with MCA, so that part is important.
There is no discovery, so that would certainly be an option to explore. Thanks for the pointer!
In version 0.45, the billingaccountid is a string instead of an integer. I m not able to test everything yet, so please provide feedback if that works now for you. Still exploring the dimensions API.
Do you currently support or have plans to support CSP (Cloud Solution Provider) agreements in your cost analysis code? Specifically, we need to track Savings Plan benefits allocation across subscriptions under a CSP agreement, where we don't have the same level of management group visibility as with EA or MCA agreements.. You might already provide support for this, and I apologize if this is more appropriate in the discussions section, but it was hard to find information about what types you support.
Do you currently support or have plans to support CSP (Cloud Solution Provider) agreements in your cost analysis code? Specifically, we need to track Savings Plan benefits allocation across subscriptions under a CSP agreement, where we don't have the same level of management group visibility as with EA or MCA agreements.. You might already provide support for this, and I apologize if this is more appropriate in the discussions section, but it was hard to find information about what types you support.
In the end, it is a call to the Azure Cost API, so that needs to support the subscription kind. See this overview of what is supported. There is no concept of CSP in the Azure Cost API, so when supported, it will just fetch the data as is.
@mivano FYI: CSP is a subset of MCA. Once you add support for MCA, you'll also cover CSP.
Thanks @flanakin, I will have to see how to get a MCA to test against.
You may be able to get a free trial subscription. I believe those are all MCA now. I'm not 100% sure, tho 🤞
But, fwiw, I would just build the EA functionality to work against Dimensions API and then release that with "experimental" support for MCA. Then be open with the community for others to help validate that, given it's difficult to get test accounts. I'm sure the community will understand 🙂 You're making their lives easier, so it's the least they can do for everything you're putting in to help everyone!
Fair point! I will dive into that dimensions endpoint.
Just a note that --billing-account is now running without error but not producing any actual results. All I get is: "Azure Cost Overview for Enrollment from 1/05/2025 to 21/05/2025" However I am running the tool with ONLY the --billing-account provided - which could be incorrect - I will investigate further and advise.
We have a MCA (Microsoft Customer Agreement). If you need specific testing against an MCA then I can help.
I will conduct further testing, analysis and triage and provide info.
maybe a silly question - but how should --billing-account be used and what is the intent and expected results? @mivano @flanakin
This may help as I work through what this is doing for MCA and I could update the doco to make --billing-account more clear on usage.
Currently I can see that it wont work for MCA as an enrollment id is expected and MCA differs from EA in this respect.
billing account now working for MCA after recent PR merge. Closing this issue.
Perfect, thanks!