mg Management groupGroups subscriptions for policy and access. The ID is unique in the tenant.
| CAF abbreviation | mg |
| Resource type | Microsoft.Management/managementGroups |
| Length | 1–90 characters |
| Case | Mixed case |
| Allowed characters | Alphanumerics, hyphens, underscores, periods, and parentheses. Start with a letter or number; can't end with a period. |
| Uniqueness | Tenant |
| Separator | Hyphen |
Source: Microsoft Learn, “Naming rules and restrictions for Azure resources”, checked October 2026. Abbreviation from the Cloud Adoption Framework.
A worked name for workload app, env prod, region weu, instance 001.
mg-app-prod-weu-001
Valid
^[A-Za-z0-9][A-Za-z0-9_().-]{0,88}[A-Za-z0-9_()-]$|^[A-Za-z0-9]$
var name = take('mg-${workload}-${env}-${region}-${instance}', 90)
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.
Unique within the Microsoft Entra tenant.
Open in the name generator