Modifying the Management Group Hierarchy
To modify the management group hierarchy, you will need to customize the configuration objects in the .bicepparam files located in templates/core/governance/mgmt-groups/.
The default Azure landing zone management group hierarchy includes:
<Tenant Root or Custom Parent>
└── Int-Root (alz)
├── Platform
│ ├── Management
│ ├── Connectivity
│ ├── Identity
│ └── Security
├── Landing Zones
│ ├── Corp
│ └── Online
├── Sandbox
└── Decommissioned
Each management group has its own folder with a main.bicep and main.bicepparam file.
Each management group’s .bicepparam file contains a configuration object. For example, int-root/main.bicepparam:
param intRootConfig = {
createOrUpdateManagementGroup: true
managementGroupName: 'alz'
managementGroupParentId: '' // Empty means tenant root
managementGroupDisplayName: 'Azure landing zone'
managementGroupDoNotEnforcePolicyAssignments: []
managementGroupExcludedPolicyAssignments: []
// ... other properties
}
To change the display name without affecting the ID, update the managementGroupDisplayName in the .bicepparam file:
platform/main.bicepparam:
param platformConfig = {
createOrUpdateManagementGroup: true
managementGroupName: 'platform'
managementGroupParentId: 'alz'
managementGroupDisplayName: 'My Organization Platform' // Changed from 'Platform'
// ... rest of config
}
To change the management group ID, update the managementGroupName property:
platform/main.bicepparam:
param platformConfig = {
createOrUpdateManagementGroup: true
managementGroupName: 'myorg-platform' // Changed from 'platform'
managementGroupParentId: 'alz'
managementGroupDisplayName: 'Platform'
// ... rest of config
}
ImportantIf you change management group IDs, you must also update:
- The
managementGroupParentIdin all child management groups- The
--management-group-idparameter in your deployment commands- Any policy assignment scopes or role assignments that reference the old ID
For example, if you change the int-root ID from alz to myorg, update all child parameter files:
platform/main.bicepparam:
param platformConfig = {
// ...
managementGroupParentId: 'myorg' // Changed from 'alz'
managementGroupIntermediateRootName: 'myorg' // Changed from 'alz'
// ...
}
ImportantCritical: If you change the int-root management group ID, you must update both
managementGroupParentIdANDmanagementGroupIntermediateRootNamein ALL child management group parameter files. ThemanagementGroupIntermediateRootNameproperty is used to dynamically update policy definition references throughout the hierarchy. Missing this update will cause policy assignment failures.For example, if changing int-root from
alztomyorg, update these properties in:
platform/main.bicepparamlandingzones/main.bicepparamsandbox/main.bicepparamdecommissioned/main.bicepparamplatform/platform-connectivity/main.bicepparamplatform/platform-identity/main.bicepparamplatform/platform-management/main.bicepparamplatform/platform-security/main.bicepparamlandingzones/landingzones-corp/main.bicepparamlandingzones/landingzones-online/main.bicepparam
To change where a management group sits in the hierarchy, update the managementGroupParentId:
landingzones/main.bicepparam:
param landingzonesConfig = {
createOrUpdateManagementGroup: true
managementGroupName: 'landingzones'
managementGroupParentId: 'myorg' // Changed to point to a different parent
managementGroupDisplayName: 'Landing Zones'
// ... rest of config
}
To add a completely new management group, you can either:
- Copy an existing management group folder (e.g.,
sandbox) as a template - Rename the folder to your new management group name
- Update the configuration in
main.bicepparam:
using './main.bicep'
param parLocations = ['eastus']
param parEnableTelemetry = true
param customMgConfig = {
createOrUpdateManagementGroup: true
managementGroupName: 'myorg-custom'
managementGroupParentId: 'landingzones' // Parent MG ID
managementGroupDisplayName: 'Custom Workloads'
managementGroupDoNotEnforcePolicyAssignments: []
managementGroupExcludedPolicyAssignments: []
customerRbacRoleDefs: []
customerRbacRoleAssignments: []
customerPolicyDefs: []
customerPolicySetDefs: []
customerPolicyAssignments: []
subscriptionsToPlaceInManagementGroup: []
waitForConsistencyCounterBeforeCustomPolicyDefinitions: 10
waitForConsistencyCounterBeforeCustomPolicySetDefinitions: 10
waitForConsistencyCounterBeforeCustomRoleDefinitions: 10
waitForConsistencyCounterBeforePolicyAssignments: 10
waitForConsistencyCounterBeforeRoleAssignment: 10
waitForConsistencyCounterBeforeSubPlacement: 10
}
param parPolicyAssignmentParameterOverrides = {}
- Update
main.bicepparameter name to match (e.g., changesandboxConfigtocustomMgConfig) - Deploy the new management group
You can add custom policy assignments to an existing management group using the customerPolicyAssignments array:
param landingzonesConfig = {
// ... existing config
customerPolicyAssignments: [
{
name: 'Custom-Policy-Assignment'
properties: {
displayName: 'My Custom Policy'
policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/<policy-id>'
scope: '/providers/Microsoft.Management/managementGroups/landingzones'
enforcementMode: 'Default'
}
}
]
}
To remove a management group from the deployment:
- Set
createOrUpdateManagementGrouptofalsein the.bicepparamfile:
param sandboxConfig = {
createOrUpdateManagementGroup: false // This will skip creation
// ... rest of config
}
Or skip deploying that management group’s template entirely
Manually delete the management group from Azure Portal if it already exists (ensure no subscriptions are assigned first)
WarningRemoving a management group from the templates does not delete it from Azure. You must manually delete it after removing all subscriptions and child resources.
You can assign subscriptions to management groups using the subscriptionsToPlaceInManagementGroup array:
landingzones-corp/main.bicepparam:
param landingzonesCorpConfig = {
// ... other config
subscriptionsToPlaceInManagementGroup: [
'subscription-id-1'
'subscription-id-2'
]
}
- Plan Before Changing: Document your desired hierarchy before making changes
- Update All References: Ensure all
managementGroupParentIdvalues are correct after renaming - Use Descriptive Names: Choose clear, consistent naming for management group IDs and display names
- Test First: Test changes in a non-production environment
- Document Customizations: Maintain documentation of why you deviated from the default structure
- Deploy in Order: Always deploy parent management groups before children
