Azure Stack Usage and Billing

This write up explains you that how Azure Stack usage is processed under:

  • Enterprise Agreement
  • Cloud Service Provider (CSP)

Brief about Azure Stack licensing models:


  • No upfront licensing fees: don’t pay until you use the service
  • Same subscriptions, monetary commitment, invoice as Azure
  • EA and CSP channels


  • Fixed fee, annual subscription, based on number of physical cores
  • No usage metering or connection to commerce
  • EA channel only (no CSP)

Azure Stack usage reporting:

Azure Stack usage reporting - flow

Core Design

We will learn on how charging meters exactly work till we receive usage report with billing.

Base is Azure Stack Resources, process of having your meter data transferred to azure is explained in the following section, each resources provider will record the service usage (Usage Record- Details will be tagged with GUID of subscription) every hour and send Usage Record to Usage Service and it stores the info in Usage DB which is local in the stack. In usage DB two services will have access, those are Usage Service and Usage Bridge (Will be active every hour at least). Usage Bridge connects to Azure public cloud.

Usage Bridge is the one which will pass the data to usage gateway within Azure public cloud, once the data processed at usage gateway, it will be submitted to commerce of Azure. The Commerce will be submitting data to billing portal ad Azure usage API. The data of usage will be processed as Azure usage metering like it is been used in Azure Public. There is no technical difference in the metering services for Azure and Azure Stack as process is similar. The meters are kept separate as charging model is different for azure stack. Only two ways available to distinguish your azure stack usage in billing and those are, region of Azure datacenter which will be called as “AzureStack region” for Stack usage(Billing portal use this). Other one is category of metering services to charge you on the usage is different from Azure public category (Azure Usage API will use this).

Mapping usage for commerce processing, usage gateway performs the following mappings (3 types of operations will happen at Azure Stack Usage Gateway)

Mapping Usage for commerce processing

  • Mapping Local subscription  to Azure Subscription, which is similar to mapping local API data to Azure API.
  • The meter IDs are diff in stack and in commerce, meters itself which are built in the stack are different compared to commerce. The stack resource providers generate more than 20 kinds of those. But Microsoft will be charging using 6 meters. But remaining meters will help partners or company to charge end customer for another usage, example: D series machines is deployed in the stack and Microsoft is charging using only one meter “Base VM size hours” for raw VM OR “Windows VM Size Hours” for VM with MS OS License. Apart from this you might be willing to charge on the size of RAM used in the machine, which you can charge using the “VM Size Hours” meter. This meter will capture most of the other data for extra charge by service provider, user workloads should run in the user/local subscriptions.

Meters used by Microsoft are listed below:

Meters used by Microsoft1

Meters used by Microsoft



  • There is need of adjusting of time stamp for meters associated with usage, this is not always but may be required. Example : Network Outage, in case of outage the usage records might not get submitted on the same day and it will be submitted to commerce on next available day but commerce might reject the record. Hence Usage Gateway will modify the time stamp accordingly, this does not mean original time stamp will be erased! The original time stamp details will be kept under additional information data with usage record while submitting it to commerce. So you can view all the data in the bill, this data will help customers to review local subscriptions and this will intern help to create charges internally to the Bus if needed.

Usage reporting should be deployed and configured. Most of the scenarios you will have OEM deploying the same. Usage in the SDK is free but we can configure for testing and see in the azure billing section on how it will get billed. (Soon I will build a usage report using SDK)

Registration script:

(A deployment engineer will run this for you!)

Add-AzsRegistration -CloudAdminCredential $cloudAdminCredential -AzureDirectoryTenantName $azureDirectoryTenantName  -AzureSubscriptionId $azureSubscriptionId -PrivilegedEndpoint $privilegedEndpoint -BillingModel <PayAsYouUse or Capacity>

Documentation in GitHub > Azure Stack Tools > Registration

Usage Reporting for EA customers

  • EA with Azure enrollment
  • Azure subscription
  • Registration using EA Azure subscription
  • Usage reported via Azure EA portal and in usage reports

Usage Reporting for Service Providers

Direct CSP Tier1 partners, owns the Azure stack and operates it. These guys will register the CSP- Azure Stack, Internal CSP tenant has to be created for dummy use and CSPs are allowed to create this tenant as Subscription as zero showed below, this will allow CSPs to register the Azure Stack under it. While adding new or existing customer, CSPs have to create the AAD tenants and CSP azure subscriptions, then add these subscriptions under registration. End customer will not see their usage in their portal or their bill, these will be available in in your CSP subscription.

Each of these end customer might have multiple local subscriptions under one Azure stack subscription, billing data are passed in similar way like explained above. Looks similar to below:Direct CSP

The Direct CSP operates Azure Stack

  • Create tenants, and Azure subscriptions in Partner Center (same as Azure)
  • Update Azure Stack registration with tenants and subscriptions
  • Usage reported in Recon file and through Partner Center APIs


InDirect CSPThe Indirect CSP Partner operates Azure Stack, most of the distributors carry out these models:

  • Create tenants, and Azure subscriptions in Partner Center (same as Azure)
  • Update Azure Stack registration with tenants and subscriptions
  • Usage reported in Recon file and through Partner Center APIs

Within Azure Stack We can build our own billing commerce using local API metering and these data will be saved in Azure commerce for 180 days for us to retrieve and use. Where should I get usage data?

Azure Commerce/Partner Center

  • Chargeable meters only
  • Central view of all your Azure Stacks and Azure
  • Probably already doing it

Azure Stack Usage APIs

  • More usage meters
  • No time advantage
  • Need to run collection on each Azure Stack
  • Usage data retained for 180 days

Local usage meters

Resource provider Meter name Description
Network Static IP Address Usage Count of IP addressess used
  Dynamic IP Address Usage Count of IP addressess used
Storage TableCapacity Total capacity consumed by tables
  PageBlobCapacity Total capacity consumed by page blobs
  QueueCapacity Total capacity consumed by queue
  BlockBlobCapacity Total capacity consumed by block blobs
  TableTransactions Table service requests (in 10,000s)
  TableDataTransIn Table service data ingress in GB
  TableDataTransOut Table service data egress in GB
  BlobTransactions Blob service requests (in 10,000s)
  BlobDataTransIn Blob service data ingress in GB
  BlobDataTransOut Blob service data egress in GB
  QueueTransactions Queue service requests (in 10,000s)
  QueueDataTransIn Queue service data ingress in GB
  QueueDataTransOut Queue service data egress in GB
Compute Base VM Size Hours Number of vcores times minutes the VM ran
  Windows VM Size Hours Number of vcores times minutes the VM ran
  VM size hours Captures both Base and Windows VM. Does not adjust for vcores
Key Vault Key Vault transactions Number of REST API requests received by Key Vault data plane

Soon Microsoft will release AppService meter (vcores); meter will be chargeable

Current list : Local Meter ID list update

Azure Commerce meters

Resource GUID Service Name Service Type Resource Name Direct Unit of Measure
0c1fecb6-52d8-4130-bbfa-f79e6a5b056d Storage Standard Disks Storage 1 GB
190c935e-9ada-48ff-9ab8-56ea1cf9adaa App Service   App 1 Core Hour
3e59e16d-a651-4979-a727-423969613c6b Virtual Machines   VM Admin 1 Core Hour
44ca5145-137d-4740-9845-b08784206c45 Storage Standard Disks Storage Admin 1 GB
5849dc2e-ac2e-489f-a53c-b2dfb0f5bdff Storage Tables Storage 1 GB
5bfe1d6a-bdf3-4cfe-8d36-a1c8e4734921 Storage Queues Storage 1 GB
7bc19779-56bc-474d-8c88-36fbd79ae004 Virtual Machines   VM 1 Core Hour
8767aeb3-6909-4db2-9927-3f51e9a9085e Storage Block Blob Storage Admin 1 GB
8a913f38-33b4-4772-9488-e89522fc09e5 Storage Block Blob Storage 1 GB
8e9d8811-9f3d-4567-8258-0ba581c143b8 Storage Queues Storage Admin 1 GB
d30b4825-579c-4463-a83e-cbd0e04dff81 Virtual Machines   Windows VM Admin 1 Core Hour
daa83056-2903-4286-826b-564f3037bf61 Storage Tables Storage Admin 1 GB
dba5e57a-99ce-4843-b7a6-1d70f36fa1a1 App Service   App Admin 1 Core Hour
fb8c0713-ea20-40bf-901f-5560fd3f6330 Virtual Machines   Windows VM 1 Core Hour

Hope this is been informative to understand the Azure Stack metering and usage reporting services. Please evaluate the same by commenting and sharing the suggestions in comments section below.

If you have questions, you can share it with me.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s