Azure naming · Microsoft.Management/managementGroups

mg Management group

Groups subscriptions for policy and access. The ID is unique in the tenant.

Naming constraints

CAF abbreviationmg
Resource typeMicrosoft.Management/managementGroups
Length1–90 characters
CaseMixed case
Allowed charactersAlphanumerics, hyphens, underscores, periods, and parentheses. Start with a letter or number; can't end with a period.
Uniqueness Tenant
SeparatorHyphen
Watch out: The ID can't be changed after creation, only the display name. Pick IDs you can live with.

Source: Microsoft Learn, “Naming rules and restrictions for Azure resources”, checked October 2026. Abbreviation from the Cloud Adoption Framework.

Example & copy-ready

A worked name for workload app, env prod, region weu, instance 001.

Example name
mg-app-prod-weu-001 Valid
Validation regex for CI checks or pre-commit hooks (.NET and JavaScript)
^[A-Za-z0-9][A-Za-z0-9_().-]{0,88}[A-Za-z0-9_()-]$|^[A-Za-z0-9]$
Bicep naming expression
var name = take('mg-${workload}-${env}-${region}-${instance}', 90)
Terraform local
locals {
  name = substr(join("-", compact(["mg", var.workload, var.env, var.region, var.instance])), 0, 90)
}

Azure Policy can't evaluate regular expressions, so a policy can check the mg prefix but not the full format. Run the regex in your pipeline, or audit existing names on a schedule.

Uniqueness scope

Unique within the Microsoft Entra tenant.

Open in the name generator