---
title: Create Azure Subscriptions with the Azure CLI
canonical: "https://data-driven.com/blog/automating-creation-of-azure-subscriptions-with-az/"
pubDate: "2018-09-06T00:00:00.000Z"
updatedDate: "2026-08-25T00:00:00.000Z"
description: "Review the original 2018 Azure CLI workflow for subscription creation, extension installation, enrollment accounts, and offer types."
tags: [automation, az-cli, azure]
categories: [azure]
---

This article records how Azure subscription creation worked through an Azure CLI extension during a 2018 public preview.

Do not run the commands as current production guidance. Azure billing accounts, enrollment models, offer types, CLI extensions, and permissions have changed. Confirm the supported workflow for your agreement in current Microsoft documentation.

## Why the extension mattered in 2018

At the time, Terraform and the Azure CLI normally worked inside an existing subscription. Creating that subscription still required a separate billing workflow.

Microsoft introduced a preview API and CLI extension for selected Enterprise Agreement scenarios. The extension added subscription commands that were not part of the base CLI installation.

## Check the CLI and available extensions

The original article began by checking the installed Azure CLI version:

```powershell
az --version
az extension list-available --output table
```

The output showed which extension packages were available.

![Azure CLI list of available extensions in 2018](/assets/blog/2018/09/azcreatesubscription.png)

The preview workflow installed the subscription extension:

```powershell
az extension add --name subscription
az account --help
```

![Azure CLI account create command shown after extension installation](/assets/blog/2018/09/azcreatecommand.png)

## The archived creation command

The 2018 preview documented a command shaped like this:

```powershell
az account create \
  --enrollment-account-name <enrollment-account-name> \
  --offer-type <offer-type>
```

Enrollment accounts could be listed with:

```powershell
az billing enrollment-account list
```

The original post referred to two offer identifiers and noted that access depended on the organisation’s Enterprise Agreement or Cloud Solution Provider arrangement. We have removed those identifiers because this archive does not establish that they remain valid.

## What must be verified now

Before automating subscription creation, confirm:

1. the billing-account and agreement type
2. the supported subscription-creation API
3. the identity and billing permissions required
4. management-group placement and policy inheritance
5. naming, tags, budgets, and ownership
6. whether the workflow is idempotent and auditable

A user’s ability to create a subscription in the Azure portal is not enough evidence that an automated identity has the required billing permissions.

Use Microsoft’s current <a href="https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/create-subscription" target="_blank" rel="noopener noreferrer">Azure subscription creation guidance</a> and the <a href="https://github.com/Azure/azure-cli-extensions" target="_blank" rel="noopener noreferrer">Azure CLI extensions repository</a> to identify the supported path.

## Why keep this page

The page is useful as a record of an early automation gap and the extension mechanism used to bridge it. It is not a supported runbook.

A current implementation should be tested in a nonproduction billing scope and reviewed by the team that owns enrollment, policy, budgets, and subscription lifecycle.
