Do you have multiple Azure subscriptions? Do you need to track usage and billing information across all your subscriptions? Are you tired of the manual work needed to collate the information at the end of each billing cycle? Then you need the new Azure Usage and Billing Portal announced a few weeks ago.

Paul Schnackenburg

Paul Schnackenburg works part time as an IT teacher as well as running his own business in Australia. He has MCSE, MCT, MCTS and MCITP certifications. Follow his blog TellITasITis.
Contents of this article

In general, you can find the billing information for a single subscription here, and a little while ago Microsoft released the Azure Resource Usage and RateCard APIs. These APIs make it easy to see rates and usage information that you can integrate into your own custom solutions programmatically. The APIs are also useful for third-party solutions such as Cloudyn and Cloud Cruiser.

But I suspect the vast majority of Azure users won’t want to develop their own solutions—nor are they necessarily keen on third-party services just to keep track of usage and spending.

This information should, of course, be part of the portal and (given the right permissions) be readily available, but that isn’t the situation today. However, a few developers within Microsoft have created a free open-source solution called the Azure Usage and Billing Portal, which we’ll look at in this article.

Components ^

You set up and configure this solution in Azure, which relies on a website for registering your subscriptions, a dashboard for displaying the information from the subscriptions, an SQL database for storing the data, a storage queue for pulling data from the APIs, and a Power BI dashboard to show the data. In case it’s not clear, some parts of this solution will have a small ongoing monthly cost. In other words, you’re paying to have a way to track costs across Azure subscriptions.

There’s a script, which is part of the download on the github page, to create all the necessary parts. You’ll need to customize this script with a subscription name and other variables; step-by-step instructions are available here.

I need to put in a warning here. Setting up this solution is not for the newbie IT pro. There are many steps to get to a working solution; some of them involve customizing the PowerShell script; others involve editing code and deploying solutions from Visual Studio.

In the end though, you do get a powerful Power BI dashboard with visualizations and graphs to keep track of your usage across all Azure services.

Steps ^

I’m not going to repeat each step of the process from the video, but having gone through the process and got it working (in the end), I’ll offer some tips for a successful deployment. In Step 3, pick a subscription that’s going to house the components for the solution. When you customize the PowerShell script in Step 4, you define an “alias,” which is going to be included in the name of various components. Make sure you don’t include a number or capitals (I used 4Sysops the first time), as one of the components is a storage account—it won’t accept anything but lowercase strings without numbers. The script does not validate your input.

Once you have the websites up and running in Step 10, open an InPrivate/Incognito browser window to the registration website and enable monitoring for each subscription:

Registration Portal completed

Registration Portal completed


In the final step (11), you customize the Power BI dashboard and can publish it for consumption from the web. The dashboard lets you select different subscriptions, services categories and subcategories, as well as the date range. I was able to look back over two years of cumulative Azure usage.

PowerBI Desktop Dashboard

PowerBI Desktop Dashboard

The web-based dashboard is a useful way to share information with other people in your organization:

PowerBI Web Dashboard

PowerBI Web Dashboard

Conclusion ^

The announcement page of this solution contains a lot of comments by people; they can be summarized as, “Don’t make us jump through (difficult) hoops; this should be part of the portal already.” I tend to agree, although I also think the developers who put together the solution aren’t really at fault—at least they’ve tried to do something about the problem.

Getting this up and running was a challenge, but the resulting dashboard is very comprehensive and gave me some unexpected insights into where the dollars go.

What this solution has taught me (apart from how to use Visual Studio a little bit) is that creating complex solutions for Azure isn’t as simple as the mantra “just use an ARM template” can lead you to believe. In this case, for instance, there are configuration changes to make to published web applications in Azure AD, which ARM doesn’t support yet.

If all you’re looking for is a quick way to get an overview of usage across subscriptions, this solution isn’t for you. If, on the other hand, you’re up for learning how multiple services work together in Azure and how to customize code in Visual Studio and dashboards in Power BI—this free solution is just the ticket.

Win the monthly 4sysops member prize for IT pros


Related Posts

  1. Steve Feldman 11 months ago

    Hey there.

    I’ve tried to complete the steps as listed above, as well as on the GitHub page and other sites. I know that there have been a lot of new commits to the project since this post was made and I was wondering if you had attempted to deploy this AUBI Portal since?

    I am getting tons of errors when trying to rebuild the solution in Visual Studio. I figured out that I needed to update a ton of the NuGet References and change some code in a few places, but I am still unable to rebuild properly. Is this something that you experienced as well? If so, how did you resolve it?


    • Author
      Paul Schnackenburg 11 months ago

      Hi Steve,

      No, I haven't played with it after writing the article. From memory I did have issues in Visual Studio (not being a developer) but eventually figured them out.

      Honestly - I think the portal is more work than it's worth. MS needs to just build the functionality into the normal UI.

      Sorry I couldn't be of more help - good luck!


  2. Aben 10 months ago

    Hi Steve,

    Just out of curiosity, how long before Data should fill up the database? I am seeing an empty database and just wondering if the webjobs can be triggered manually to get an output?




  3. Jack 7 months ago

    Does anybody have idea that how much will be approximate cost per month of running this solution in Azure?


    • Author
      Paul Schnackenburg 7 months ago

      Hi Jack,Unfortunately I didn't run it for long enough to get a good figure on the cost. Hopefully someone else will know and chime in. I really hope MS puts this functionality in the main portal, so we won't have to fiddle around with this "solution".


Leave a reply

Your email address will not be published. Required fields are marked *



Please ask IT administration questions in the forum. Any other messages are welcome.

© 4sysops 2006 - 2017

Log in with your credentials


Forgot your details?

Create Account