Azure Management Groups Overview
Azure Management Groups Overview
e OVERVIEW
e OVERVIEW
Get started
f QUICKSTART
c HOW-TO GUIDE
Reference
i REFERENCE
Azure CLI
Azure PowerShell
REST
Governance in Azure is one aspect of Azure Management. This article covers the
different areas of management for deploying and maintaining your resources in Azure.
Management refers to the tasks and processes required to maintain your business
applications and the resources that support them. Azure has many services and tools
that work together to provide complete management. These services aren't only for
resources in Azure, but also in other clouds and on-premises. Understanding the
different tools and how they work together is the first step in designing a complete
management environment.
The following diagram illustrates the different areas of management that are required to
maintain any application or resource. These different areas can be thought of as a
lifecycle. Each area is required in continuous succession over the lifespan of a resource.
This resource lifecycle starts with the initial deployment, through continued operation,
and finally when retired.
Monitor
Monitoring is the act of collecting and analyzing data to audit the performance, health,
and availability of your resources. An effective monitoring strategy helps you
understand the operation of components and to increase your uptime with notifications.
Read an overview of Monitoring that covers the different services used at Monitoring
Azure applications and resources.
Configure
Configure refers to the initial deployment and configuration of resources and ongoing
maintenance. Automation of these tasks allows you to eliminate redundancy, minimizing
your time and effort and increasing your accuracy and efficiency. Azure Automation
provides the bulk of services for automating configuration tasks. While runbooks handle
process automation, configuration and update management help manage
configuration.
Govern
Governance provides mechanisms and processes to maintain control over your
applications and resources in Azure. It involves planning your initiatives and setting
strategic priorities. Governance in Azure is primarily implemented with two services.
Azure Policy allows you to create, assign, and manage policy definitions to enforce rules
for your resources. This feature keeps those resources in compliance with your corporate
standards. Azure Cost Management allows you to track cloud usage and expenditures
for your Azure resources and other cloud providers.
Secure
Manage the security of your resources and data. A security program involves assessing
threats, collecting and analyzing data, and compliance of your applications and
resources. Security monitoring and threat analysis are provided by Microsoft Defender
for Cloud, which includes unified security management and advanced threat protection
across hybrid cloud workloads. See Introduction to Azure Security for comprehensive
information and guidance on securing Azure resources.
Protect
Protection refers to keeping your applications and data available, even with outages that
are beyond your control. Protection in Azure is provided by two services. Azure Backup
provides backup and recovery of your data, either in the cloud or on-premises. Azure
Site Recovery provides business continuity and immediate recovery during a disaster.
Migrate
Migration refers to transitioning workloads currently running on-premises to the Azure
cloud. Azure Migrate is a service that helps you assess the migration suitability of on-
premises virtual machines to Azure. Azure Site Recovery migrates virtual machines from
on-premises or from Amazon Web Services. Azure Database Migration Service assists
you in migrating database sources to Azure Data platforms.
Next Steps
To learn more about Azure Governance, see these articles:
If your organization has many Azure subscriptions, you may need a way to efficiently
manage access, policies, and compliance for those subscriptions. Management groups
provide a governance scope above subscriptions. You organize subscriptions into
management groups; the governance conditions you apply cascade by inheritance to all
associated subscriptions.
For example, you can apply policies to a management group that limits the regions
available for virtual machine (VM) creation. This policy would be applied to all nested
management groups, subscriptions, and resources, and allow VM creation only in
authorized regions.
You can create a hierarchy that applies a policy, for example, which limits VM locations
to the West US region in the management group called "Corp". This policy will inherit
onto all the Enterprise Agreement (EA) subscriptions that are descendants of that
management group and will apply to all VMs under those subscriptions. This security
policy cannot be altered by the resource or subscription owner allowing for improved
governance.
7 Note
Another scenario where you would use management groups is to provide user access to
multiple subscriptions. By moving multiple subscriptions under that management group,
you can create one Azure role assignment on the management group, which will inherit
that access to all the subscriptions. One assignment on the management group can
enable users to have access to everything they need instead of scripting Azure RBAC
over different subscriptions.
) Important
Any assignment of user access or policy on the root management group applies to
all resources within the directory. Because of this, all customers should evaluate
the need to have items defined on this scope. User access and policy assignments
should be "Must Have" only at this scope.
The following chart shows the list of roles and the supported actions on management
groups.
Azure Role Name Create Rename Move** Delete Assign Assign Read
Access Policy
Owner X X X X X X X
Contributor X X X X X
MG Contributor* X X X X X
Reader X
MG Reader* X
Resource Policy X
Contributor
User Access X X
Administrator
*: The Management Group Contributor and Management Group Reader roles allow
users to perform those actions only on the management group scope.
**: Role assignments on the root management group aren't required to move a
subscription or management group to and from it.
See Manage your resources with management groups for details on moving items
within the hierarchy.
Example definition
Defining and creating a custom role doesn't change with the inclusion of management
groups. Use the full path to define the management group
/providers/[Link]/managementgroups/{groupId}.
Use the management group's ID and not the management group's display name. This
common error happens since both are custom-defined fields when creating a
management group.
JSON
...
{
"Name": "MG Test Custom Role",
"Id": "id",
"IsCustom": true,
"Description": "This role provides members understand custom roles.",
"Actions": [
"[Link]/managementgroups/delete",
"[Link]/managementgroups/read",
"[Link]/managementgroup/write",
"[Link]/managementgroup/subscriptions/delete",
"[Link]/managementgroup/subscriptions/write",
"[Link]/subscriptions/read",
"[Link]/policyAssignments/*",
"[Link]/policyDefinitions/*",
"[Link]/policySetDefinitions/*",
"[Link]/*",
"[Link]/roleAssignments/*",
"[Link]/roledefinitions/*"
],
"NotActions": [],
"DataActions": [],
"NotDataActions": [],
"AssignableScopes": [
"/providers/[Link]/managementGroups/ContosoCorporate"
]
}
...
Issues with breaking the role definition and assignment
hierarchy path
Role definitions are assignable scope anywhere within the management group
hierarchy. A role definition can be defined on a parent management group while the
actual role assignment exists on the child subscription. Since there's a relationship
between the two items, you'll receive an error when trying to separate the assignment
from its definition.
Let's say there's a custom role defined on the Sandbox management group. That
custom role is then assigned on the two Sandbox subscriptions.
Limitations
There are limitations that exist when using custom roles on management groups.
You can only define one management group in the assignable scopes of a new
role. This limitation is in place to reduce the number of situations where role
definitions and role assignments are disconnected. This situation happens when a
subscription or management group with a role assignment moves to a different
parent that doesn't have the role definition.
Resource provider data plane actions can't be defined in management group
custom roles. This restriction is in place as there's a latency issue with updating the
data plane resource providers. This latency issue is being worked on and these
actions will be disabled from the role definition to reduce any risks.
Azure Resource Manager doesn't validate the management group's existence in
the role definition's assignable scope. If there's a typo or an incorrect management
group ID listed, the role definition is still created.
Management group write and role assignment write permissions on the child
subscription or management group.
Built-in role example: Owner
Management group write access on the target parent management group.
Built-in role example: Owner, Contributor, Management Group Contributor
Management group write access on the existing parent management group.
Built-in role example: Owner, Contributor, Management Group Contributor
Exception: If the target or the existing parent management group is the root
management group, the permissions requirements don't apply. Since the root
management group is the default landing spot for all new management groups and
subscriptions, you don't need permissions on it to move an item.
If the Owner role on the subscription is inherited from the current management group,
your move targets are limited. You can only move the subscription to another
management group where you have the Owner role. You can't move it to a
management group where you're a Contributor because you would lose ownership of
the subscription. If you're directly assigned to the Owner role for the subscription (not
inherited from the management group), you can move it to any management group
where you're assigned the Contributor role.
) Important
When looking to query on management groups outside the Azure portal, the target
scope for management groups looks like
"/providers/[Link]/managementGroups/{management-group-id}".
7 Note
Using the Azure Resource Manager REST API, you can enable diagnostic settings on
a management group to send related Azure Activity log entries to a Log Analytics
workspace, Azure Storage, or Azure Event Hub. For more information, see
Management Group Diagnostic Settings - Create Or Update.
Next steps
To learn more about management groups, see:
Management groups are containers that help you manage access, policy, and
compliance across multiple subscriptions. Create these containers to build an effective
and efficient hierarchy that can be used with Azure Policy and Azure Role Based Access
Controls. For more information on management groups, see Organize your resources
with Azure management groups.
The first management group created in the directory could take up to 15 minutes to
complete. There are processes that run the first time to set up the management groups
service within Azure for your directory. You receive a notification when the process is
complete. For more information, see initial setup of management groups.
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
Any Azure AD user in the tenant can create a management group without the
management group write permission assigned to that user if hierarchy protection
isn't enabled. This new management group becomes a child of the Root
Management Group or the default management group and the creator is given an
"Owner" role assignment. Management group service allows this ability so that
role assignments aren't needed at the root level. No users have access to the Root
Management Group when it's created. To avoid the hurdle of finding the Azure AD
Global Admins to start using management groups, we allow the creation of the
initial management groups at the root level.
Create in portal
1. Log into the Azure portal .
6. Select Save.
Clean up resources
To remove the management group created, follow these steps:
Next steps
In this quickstart, you created a management group to organize your resource hierarchy.
The management group can hold subscriptions or other management groups.
To learn more about management groups and how to manage your resource hierarchy,
continue to:
Management groups are containers that help you manage access, policy, and
compliance across multiple subscriptions. Create these containers to build an effective
and efficient hierarchy that can be used with Azure Policy and Azure Role Based Access
Controls. For more information on management groups, see Organize your resources
with Azure management groups.
The first management group created in the directory could take up to 15 minutes to
complete. There are processes that run the first time to set up the management groups
service within Azure for your directory. You receive a notification when the process is
complete. For more information, see initial setup of management groups.
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
This quickstart requires that you run Azure CLI version 2.0.76 or later to install and
use the CLI locally. To find the version, run az --version . If you need to install or
upgrade, see Install Azure CLI.
Any Azure AD user in the tenant can create a management group without the
management group write permission assigned to that user if hierarchy protection
isn't enabled. This new management group becomes a child of the Root
Management Group or the default management group and the creator is given an
"Owner" role assignment. Management group service allows this ability so that
role assignments aren't needed at the root level. No users have access to the Root
Management Group when it's created. To avoid the hurdle of finding the Azure AD
Global Admins to start using management groups, we allow the creation of the
initial management groups at the root level.
Option Example/Link
Select the Cloud Shell button on the menu bar at the upper right in
the Azure portal .
2. Select the Copy button on a code block (or command block) to copy the code or
command.
3. Paste the code or command into the Cloud Shell session by selecting Ctrl+Shift+V
on Windows and Linux, or by selecting Cmd+Shift+V on macOS.
Azure CLI
The name is a unique identifier being created. This ID is used by other commands to
reference this group and it can't be changed later.
If you want the management group to show a different name within the Azure portal,
add the display-name parameter. For example, to create a management group with the
GroupName of Contoso and the display name of "Contoso Group", use the following
command:
Azure CLI
az account management-group create --name 'Contoso' --display-name 'Contoso
Group'
In the preceding examples, the new management group is created under the root
management group. To specify a different management group as the parent, use the
parent parameter and provide the name of the parent group.
Azure CLI
Clean up resources
To remove the management group created above, use the az account management-
group delete command:
Azure CLI
Next steps
In this quickstart, you created a management group to organize your resource hierarchy.
The management group can hold subscriptions or other management groups.
To learn more about management groups and how to manage your resource hierarchy,
continue to:
Management groups are containers that help you manage access, policy, and
compliance across multiple subscriptions. Create these containers to build an effective
and efficient hierarchy that can be used with Azure Policy and Azure Role Based Access
Controls. For more information on management groups, see Organize your resources
with Azure management groups.
The first management group created in the directory could take up to 15 minutes to
complete. There are processes that run the first time to set up the management groups
service within Azure for your directory. You receive a notification when the process is
complete. For more information, see initial setup of management groups.
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
Before you start, make sure that the latest version of Azure PowerShell is installed.
See Install Azure PowerShell module for detailed information.
Any Azure AD user in the tenant can create a management group without the
management group write permission assigned to that user if hierarchy protection
isn't enabled. This new management group becomes a child of the Root
Management Group or the default management group and the creator is given an
"Owner" role assignment. Management group service allows this ability so that
role assignments aren't needed at the root level. No users have access to the Root
Management Group when it's created. To avoid the hurdle of finding the Azure AD
Global Admins to start using management groups, we allow the creation of the
initial management groups at the root level.
Select the Cloud Shell button on the menu bar at the upper right in
the Azure portal .
2. Select the Copy button on a code block (or command block) to copy the code or
command.
3. Paste the code or command into the Cloud Shell session by selecting Ctrl+Shift+V
on Windows and Linux, or by selecting Cmd+Shift+V on macOS.
Azure PowerShell
The GroupName is a unique identifier being created. This ID is used by other commands
to reference this group and it can't be changed later.
If you want the management group to show a different name within the Azure portal,
add the DisplayName parameter. For example, to create a management group with the
GroupName of Contoso and the display name of "Contoso Group", use the following
cmdlet:
Azure PowerShell
Azure PowerShell
Clean up resources
To remove the management group created above, use the Remove-
AzManagementGroup cmdlet:
Azure PowerShell
Next steps
In this quickstart, you created a management group to organize your resource hierarchy.
The management group can hold subscriptions or other management groups.
To learn more about management groups and how to manage your resource hierarchy,
continue to:
Management groups are containers that help you manage access, policy, and
compliance across multiple subscriptions. Create these containers to build an effective
and efficient hierarchy that can be used with Azure Policy and Azure Role Based Access
Controls. For more information on management groups, see Organize your resources
with Azure management groups.
The first management group created in the directory could take up to 15 minutes to
complete. There are processes that run the first time to set up the management groups
service within Azure for your directory. You receive a notification when the process is
complete. For more information, see initial setup of management groups.
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
An Azure service principal, including the clientId and clientSecret. If you don't have
a service principal for use with Azure Policy or want to create a new one, see Azure
management libraries for .NET authentication. Skip the step to install the .NET Core
packages as we'll do that in the next steps.
Any Azure AD user in the tenant can create a management group without the
management group write permission assigned to that user if hierarchy protection
isn't enabled. This new management group becomes a child of the Root
Management Group or the default management group and the creator is given an
"Owner" role assignment. Management group service allows this ability so that
role assignments aren't needed at the root level. No users have access to the Root
Management Group when it's created. To avoid the hurdle of finding the Azure AD
Global Admins to start using management groups, we allow the creation of the
initial management groups at the root level.
Option Example/Link
Select the Cloud Shell button on the menu bar at the upper right in
the Azure portal .
2. Select the Copy button on a code block (or command block) to copy the code or
command.
3. Paste the code or command into the Cloud Shell session by selecting Ctrl+Shift+V
on Windows and Linux, or by selecting Cmd+Shift+V on macOS.
Application setup
To enable .NET Core to manage management groups, create a new console application
and install the required packages.
1. Check that the latest .NET Core is installed (at least 3.1.8). If it isn't yet installed,
download it at [Link] .
.NET CLI
3. Change directories into the new project folder and install the required packages
for Azure Policy:
.NET CLI
4. Replace the default [Link] with the following code and save the updated file:
C#
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
namespace mgCreate
{
class Program
{
static async Task Main(string[] args)
{
string strTenant = args[0];
string strClientId = args[1];
string strClientSecret = args[2];
string strGroupId = args[3];
string strDisplayName = args[4];
.NET CLI
dotnet build
dotnet publish -o {run-folder}
1. Change directories to the {run-folder} you defined with the previous dotnet
publish command.
Bash
[Link] `
"{tenantId}" `
"{clientId}" `
"{clientSecret}" `
"{groupID}" `
"{displayName}"
Clean up resources
Delete the new management group through the portal.
If you wish to remove the .NET Core console application and installed packages,
delete the mgCreate project folder.
Next steps
In this quickstart, you created a management group to organize your resource hierarchy.
The management group can hold subscriptions or other management groups.
To learn more about management groups and how to manage your resource hierarchy,
continue to:
Management groups are containers that help you manage access, policy, and
compliance across multiple subscriptions. Create these containers to build an effective
and efficient hierarchy that can be used with Azure Policy and Azure Role Based Access
Controls. For more information on management groups, see Organize your resources
with Azure management groups.
The first management group created in the directory could take up to 15 minutes to
complete. There are processes that run the first time to set up the management groups
service within Azure for your directory. You receive a notification when the process is
complete. For more information, see initial setup of management groups.
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
An Azure service principal, including the clientId and clientSecret. If you don't have
a service principal for use with Azure Policy or want to create a new one, see Azure
management libraries for .NET authentication. Skip the step to install the .NET Core
packages as we'll do that in the next steps.
Any Azure AD user in the tenant can create a management group without the
management group write permission assigned to that user if hierarchy protection
isn't enabled. This new management group becomes a child of the Root
Management Group or the default management group and the creator is given an
"Owner" role assignment. Management group service allows this ability so that
role assignments aren't needed at the root level. No users have access to the Root
Management Group when it's created. To avoid the hurdle of finding the Azure AD
Global Admins to start using management groups, we allow the creation of the
initial management groups at the root level.
Option Example/Link
Select the Cloud Shell button on the menu bar at the upper right in
the Azure portal .
2. Select the Copy button on a code block (or command block) to copy the code or
command.
3. Paste the code or command into the Cloud Shell session by selecting Ctrl+Shift+V
on Windows and Linux, or by selecting Cmd+Shift+V on macOS.
1. Check that the latest Go is installed (at least 1.15). If it isn't yet installed, download
it at [Link] .
2. Check that the latest Azure CLI is installed (at least 2.5.1). If it isn't yet installed, see
Install the Azure CLI.
7 Note
Azure CLI
az login
Bash
Application setup
With the Go packages added to your environment of choice, it's time to set up the Go
application that can create a management group.
Go
package main
import (
"context"
"fmt"
"os"
mg "[Link]/Azure/azure-sdk-for-go/services/resources/mgmt/2020-05-
01/managementgroups"
"[Link]/Azure/go-autorest/autorest/azure/auth"
)
func main() {
// Get variables from command line arguments
var mgName = [Link][1]
Bash
go build [Link]
Bash
mgCreate "<Name>"
Clean up resources
If you wish to remove the installed packages from your Go environment, you can do so
by using the following command:
Bash
Next steps
In this quickstart, you created a management group to organize your resource hierarchy.
The management group can hold subscriptions or other management groups.
To learn more about management groups and how to manage your resource hierarchy,
continue to:
Management groups are containers that help you manage access, policy, and
compliance across multiple subscriptions. Create these containers to build an effective
and efficient hierarchy that can be used with Azure Policy and Azure Role Based Access
Controls. For more information on management groups, see Organize your resources
with Azure management groups.
The first management group created in the directory could take up to 15 minutes to
complete. There are processes that run the first time to set up the management groups
service within Azure for your directory. You receive a notification when the process is
complete. For more information, see initial setup of management groups.
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
Before you start, make sure that at least version 12 of [Link] is installed.
Any Azure AD user in the tenant can create a management group without the
management group write permission assigned to that user if hierarchy protection
isn't enabled. This new management group becomes a child of the Root
Management Group or the default management group and the creator is given an
"Owner" role assignment. Management group service allows this ability so that
role assignments aren't needed at the root level. No users have access to the Root
Management Group when it's created. To avoid the hurdle of finding the Azure AD
Global Admins to start using management groups, we allow the creation of the
initial management groups at the root level.
Select the Cloud Shell button on the menu bar at the upper right in
the Azure portal .
2. Select the Copy button on a code block (or command block) to copy the code or
command.
3. Paste the code or command into the Cloud Shell session by selecting Ctrl+Shift+V
on Windows and Linux, or by selecting Cmd+Shift+V on macOS.
Application setup
To enable JavaScript to manage management groups, the environment must be set up.
This setup works wherever JavaScript can be used, including bash on Windows 10.
Bash
npm init -y
Bash
Bash
npm install @azure/arm-managementgroups
Bash
7 Note
JavaScript
createMG();
}
Bash
node [Link] --groupID "<NEW_MG_GROUP_ID>" --displayName "
<NEW_MG_FRIENDLY_NAME>"
Make sure to replace each token <> placeholder with your management group ID
and management group friendly name, respectively.
Once you authenticate in the browser, then the script continues to run.
Clean up resources
If you wish to remove the installed libraries from your application, run the following
command.
Bash
Next steps
In this quickstart, you created a management group to organize your resource hierarchy.
The management group can hold subscriptions or other management groups.
To learn more about management groups and how to manage your resource hierarchy,
continue to:
Management groups are containers that help you manage access, policy, and
compliance across multiple subscriptions. Create these containers to build an effective
and efficient hierarchy that can be used with Azure Policy and Azure Role Based Access
Controls. For more information on management groups, see Organize your resources
with Azure management groups.
The first management group created in the directory could take up to 15 minutes to
complete. There are processes that run the first time to set up the management groups
service within Azure for your directory. You receive a notification when the process is
complete. For more information, see initial setup of management groups.
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
Any Azure AD user in the tenant can create a management group without the
management group write permission assigned to that user if hierarchy protection
isn't enabled. This new management group becomes a child of the Root
Management Group or the default management group and the creator is given an
"Owner" role assignment. Management group service allows this ability so that
role assignments aren't needed at the root level. No users have access to the Root
Management Group when it's created. To avoid the hurdle of finding the Azure AD
Global Admins to start using management groups, we allow the creation of the
initial management groups at the root level.
Option Example/Link
Option Example/Link
Select the Cloud Shell button on the menu bar at the upper right in
the Azure portal .
2. Select the Copy button on a code block (or command block) to copy the code or
command.
3. Paste the code or command into the Cloud Shell session by selecting Ctrl+Shift+V
on Windows and Linux, or by selecting Cmd+Shift+V on macOS.
1. Check that the latest Python is installed (at least 3.8). If it isn't yet installed,
download it at [Link] .
2. Check that the latest Azure CLI is installed (at least 2.5.1). If it isn't yet installed, see
Install the Azure CLI.
7 Note
az login
Bash
# Add the CLI Core library for Python for authentication (development
only!)
pip install azure-cli-core
7 Note
If Python is installed for all users, these commands must be run from an
elevated console.
Bash
Python
# Show results
print(mg)
createmanagementgroup("MyNewMG")
Bash
py [Link]
The result of creating the management group is output to the console as an LROPoller
object.
Clean up resources
If you wish to remove the installed libraries from your Python environment, you can do
so by using the following command:
Bash
# Remove the installed libraries from the Python environment
pip uninstall azure-mgmt-managementgroups azure-mgmt-resource azure-cli-core
Next steps
In this quickstart, you created a management group to organize your resource hierarchy.
The management group can hold subscriptions or other management groups.
To learn more about management groups and how to manage your resource hierarchy,
continue to:
Management groups are containers that help you manage access, policy, and
compliance across multiple subscriptions. Create these containers to build an effective
and efficient hierarchy that can be used with Azure Policy and Azure Role Based Access
Controls. For more information on management groups, see Organize your resources
with Azure management groups.
The first management group created in the directory could take up to 15 minutes to
complete. There are processes that run the first time to set up the management groups
service within Azure for your directory. You receive a notification when the process is
complete. For more information, see initial setup of management groups.
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
If you haven't already, install ARMClient . It's a tool that sends HTTP requests to
Azure Resource Manager-based REST APIs. Instead, you can use the "Try It" feature
in REST documentation or tooling like PowerShell's Invoke-RestMethod or
Postman .
Any Azure AD user in the tenant can create a management group without the
management group write permission assigned to that user if hierarchy protection
isn't enabled. This new management group becomes a child of the Root
Management Group or the default management group and the creator is given an
"Owner" role assignment. Management group service allows this ability so that
role assignments aren't needed at the root level. No users have access to the Root
Management Group when it's created. To avoid the hurdle of finding the Azure AD
Global Admins to start using management groups, we allow the creation of the
initial management groups at the root level.
Option Example/Link
Select the Cloud Shell button on the menu bar at the upper right in
the Azure portal .
2. Select the Copy button on a code block (or command block) to copy the code or
command.
3. Paste the code or command into the Cloud Shell session by selecting Ctrl+Shift+V
on Windows and Linux, or by selecting Cmd+Shift+V on macOS.
HTTP
PUT
[Link]
roups/Contoso?api-version=2020-05-01
No Request Body
The groupId is a unique identifier being created. This ID is used by other commands to
reference this group and it can't be changed later.
If you want the management group to show a different name within the Azure portal,
add the [Link] property in the request body. For example, to create a
management group with the groupId of Contoso and the display name of Contoso
Group, use the following endpoint and request body:
HTTP
PUT
[Link]
roups/Contoso?api-version=2020-05-01
Request Body
JSON
{
"properties": {
"displayName": "Contoso Group"
}
}
In the preceding examples, the new management group is created under the root
management group. To specify a different management group as the parent, use the
[Link] property.
HTTP
PUT
[Link]
roups/Contoso?api-version=2020-05-01
Request Body
JSON
{
"properties": {
"displayName": "Contoso Group",
"parent": {
"id":
"/providers/[Link]/managementGroups/HoldingGroup"
}
}
}
Clean up resources
To remove the management group created above, use the Management Groups -
Delete endpoint:
HTTP
DELETE
[Link]
roups/Contoso?api-version=2020-05-01
No Request Body
Next steps
In this quickstart, you created a management group to organize your resource hierarchy.
The management group can hold subscriptions or other management groups.
To learn more about management groups and how to manage your resource hierarchy,
continue to:
This page is a collection of Azure Resource Graph sample queries for management
groups. For a complete list of Azure Resource Graph samples, see Resource Graph
samples by Category and Resource Graph samples by Table.
Sample queries
Kusto
ResourceContainers
| where type =~ '[Link]/managementgroups'
| project mgname = name
| join kind=leftouter (resourcecontainers | where type=~
'[Link]/subscriptions'
| extend mgParent = [Link] | project id,
mgname = tostring(mgParent[0].name)) on mgname
| summarize count() by mgname
Azure CLI
Azure CLI
Kusto
ResourceContainers
| where type =~ '[Link]/managementgroups'
| extend mgParent = [Link]
| mv-expand with_itemindex=MGHierarchy mgParent
| project name, [Link], mgParent, MGHierarchy, [Link]
Azure CLI
Azure CLI
Kusto
ResourceContainers
| where type =~ '[Link]/subscriptions'
| extend mgParent = [Link]
| mv-expand with_itemindex=MGHierarchy mgParent
| project subscriptionId, name, mgParent, MGHierarchy, [Link]
Azure CLI
Azure CLI
Kusto
ResourceContainers
| where type =~ '[Link]/subscriptions'
| project subscriptionId, name
Azure CLI
Azure CLI
Kusto
SecurityResources
| where type == '[Link]/securescores'
| project subscriptionId,
subscriptionTotal = iff([Link] == 0, 0.00,
round(tolong([Link]) *
todouble([Link])/tolong([Link]),2)),
weight = tolong(iff([Link] == 0, 1, [Link]))
| join kind=leftouter (
ResourceContainers
| where type == '[Link]/subscriptions' and [Link]
== 'Enabled'
| project subscriptionId,
mgChain=[Link] )
on subscriptionId
| mv-expand mg=mgChain
| summarize sumSubs = sum(subscriptionTotal), sumWeight = sum(weight),
resultsNum = count() by tostring([Link]), mgId = tostring([Link])
| extend secureScore = iff(tolong(resultsNum) == 0, 404.00,
round(sumSubs/sumWeight*100,2))
| project mgName=mg_displayName, mgId, sumSubs, sumWeight, resultsNum,
secureScore
| order by mgName asc
Azure CLI
Azure CLI
Next steps
Learn more about the query language.
Learn more about how to explore resources.
See samples of Starter language queries.
See samples of Advanced language queries.
Manage your Azure subscriptions at
scale with management groups
Article • 03/08/2023
If your organization has many subscriptions, you may need a way to efficiently manage
access, policies, and compliance for those subscriptions. Azure management groups
provide a level of scope above subscriptions. You organize subscriptions into containers
called "management groups" and apply your governance conditions to the
management groups. All subscriptions within a management group automatically inherit
the conditions applied to the management group.
7 Note
This article provides steps about how to delete personal data from the device or
service and can be used to support your obligations under the GDPR. For general
information about GDPR, see the GDPR section of the Microsoft Trust Center
and the GDPR section of the Service Trust portal .
) Important
Azure Resource Manager user tokens and management group cache lasts for 30
minutes before they are forced to refresh. After doing any action like moving a
management group or subscription, it might take up to 30 minutes to show. To see
the updates sooner you need to update your token by refreshing the browser,
signing in and out, or requesting a new token.
) Important
4. Select details.
6. When the menu opens, enter the new name you would like to have displayed.
7. Select Save.
Azure PowerShell
Azure CLI
4. Select details.
5. Select Delete
Tip
If the icon is disabled, hovering your mouse selector over the icon shows you
the reason.
6. There's a window that opens confirming you want to delete the management
group.
7. Select Yes.
Delete in PowerShell
Use the Remove-AzManagementGroup command within PowerShell to delete
management groups.
Azure PowerShell
Azure CLI
3. The management group hierarchy page will load. This page is where you can
explore all the management groups and subscriptions you have access to.
Selecting the group name takes you to a lower level in the hierarchy. The
navigation works the same as a file explorer does.
4. To see the details of the management group, select the (details) link next to the
title of the management group. If this link isn't available, you don't have
permissions to view that management group.
View in PowerShell
You use the Get-AzManagementGroup command to retrieve all groups. See
[Link] modules for the full list of management group GET PowerShell commands.
Azure PowerShell
Get-AzManagementGroup
Azure PowerShell
To return a specific management group and all the levels of the hierarchy under it, use -
Expand and -Recurse parameters.
Azure PowerShell
PS C:\> $response = Get-AzManagementGroup -GroupId TestGroupParent -Expand -
Recurse
PS C:\> $response
Id :
/providers/[Link]/managementGroups/TestGroupParent
Type : /providers/[Link]/managementGroups
Name : TestGroupParent
TenantId : 00000000-0000-0000-0000-000000000000
DisplayName : TestGroupParent
UpdatedTime : 2/1/2018 [Link] AM
UpdatedBy : 00000000-0000-0000-0000-000000000000
ParentId :
/providers/[Link]/managementGroups/00000000-0000-0000-0000-
000000000000
ParentName : 00000000-0000-0000-0000-000000000000
ParentDisplayName : 00000000-0000-0000-0000-000000000000
Children : {TestGroup1DisplayName, TestGroup2DisplayName}
PS C:\> $[Link][0]
Type : /managementGroup
Id : /providers/[Link]/managementGroups/TestGroup1
Name : TestGroup1
DisplayName : TestGroup1DisplayName
Children : {TestRecurseChild}
PS C:\> $[Link][0].Children[0]
Type : /managementGroup
Id :
/providers/[Link]/managementGroups/TestRecurseChild
Name : TestRecurseChild
DisplayName : TestRecurseChild
Children :
Azure CLI
Azure CLI
Azure CLI
If you're doing the move action, you need permission at each of the following layers:
Subscriptions)
[Link]/roleAssignments/write
[Link]/roleAssignments/delete
[Link]/register/action
Target parent management group
[Link]/managementgroups/write
Exception: If the target or the existing parent management group is the Root
management group, the permissions requirements don't apply. Since the Root
management group is the default landing spot for all new management groups and
subscriptions, you don't need permissions on it to move an item.
If the Owner role on the subscription is inherited from the current management group,
your move targets are limited. You can only move the subscription to another
management group where you have the Owner role. You can't move the subscription to
a management group where you're only a contributor because you would lose
ownership of the subscription. If you're directly assigned to the Owner role for the
subscription, you can move it to any management group where you're a contributor.
To see what permissions you have in the Azure portal, select the management group
and then select IAM. To learn more on Azure roles, see Azure role-based access control
(Azure RBAC).
Move subscriptions
6. Select "Save".
4. Select the ellipse at the end of the row for the subscription in the list you want to
move.
5. Select Move.
7. Select Save.
Azure PowerShell
To remove the link between the subscription and the management group use the
Remove-AzManagementGroupSubscription command.
Azure PowerShell
Azure CLI
To remove the subscription from the management group, use the subscription remove
command.
Azure CLI
JSON
{
"$schema": "[Link]
01/[Link]#",
"contentVersion": "[Link]",
"parameters": {
"targetMgId": {
"type": "string",
"metadata": {
"description": "Provide the ID of the management group that
you want to move the subscription to."
}
},
"subscriptionId": {
"type": "string",
"metadata": {
"description": "Provide the ID of the existing subscription
to move."
}
}
},
"resources": [
{
"scope": "/",
"type": "[Link]/managementGroups/subscriptions",
"apiVersion": "2020-05-01",
"name": "[concat(parameters('targetMgId'), '/',
parameters('subscriptionId'))]",
"properties": {
}
}
],
"outputs": {}
}
Bicep
targetScope = 'managementGroup'
6. Select Save.
Azure PowerShell
Azure CLI
When looking to query on Management Groups outside of the Azure portal, the target
scope for management groups looks like
"/providers/[Link]/managementGroups/{yourMgID}".
/providers/[Link]/managementGroups/{yourMgID}
Azure PowerShell
New-AzRoleAssignment -Scope
"/providers/[Link]/managementGroups/Contoso"
The same scope path is used when retrieving a policy definition at a management
group.
HTTP
GET
[Link]
/MyManagementGroup/providers/[Link]/policyDefinitions/Resou
rceNaming?api-version=2019-09-01
Next steps
To learn more about management groups, see:
Management groups now have hierarchy settings that enable the tenant administrator
to control these behaviors. This article covers each of the available hierarchy settings
and how to set them.
[Link]/managementgroups/settings/write
[Link]/managementgroups/settings/read
These operations only allow a user to read and update the hierarchy settings. The
operations don't provide any other access to the management group hierarchy or
resources in the hierarchy. Both of these operations are available in the Azure built-in
role Hierarchy Settings Administrator.
1. Use the search bar to search for and select 'Management groups'.
2. On the root management group, select details next to the name of the
management group.
7 Note
5. Select a management group from your hierarchy and use the Select button.
HTTP
PUT
[Link]
roups/{rootMgID}/settings/default?api-version=2020-05-01
Request Body
JSON
{
"properties": {
"defaultManagementGroup":
"/providers/[Link]/managementGroups/{defaultGroupID}"
}
}
To set the default management group back to the root management group, use the
same endpoint and set defaultManagementGroup to a value of
/providers/[Link]/managementGroups/{rootMgID} .
1. Use the search bar to search for and select 'Management groups'.
2. On the root management group, select details next to the name of the
management group.
4. Toggle the Require permissions for creating new management groups. option to
on.
7 Note
HTTP
PUT
[Link]
roups/{rootMgID}/settings/default?api-version=2020-05-01
Request Body
JSON
{
"properties": {
"requireAuthorizationForGroupCreation": true
}
}
To turn the setting back off, use the same endpoint and set
requireAuthorizationForGroupCreation to a value of false.
PowerShell sample
PowerShell doesn't have an 'Az' command to set the default management group or set
require authorization, but as a workaround you can use the REST API with the
PowerShell sample below:
PowerShell
$body = '{
"properties": {
"defaultManagementGroup":
"/providers/[Link]/managementGroups/' +
$default_management_group_id + '",
"requireAuthorizationForGroupCreation": true
}
}'
$token = (Get-AzAccessToken).Token
$headers = @{"Authorization"= "Bearer $token"; "Content-Type"=
"application/json"}
$uri =
"[Link]
s/$root_management_group_id/settings/default?api-version=2020-05-01"
Next steps
To learn more about management groups, see:
When you create and work with management groups you might run into errors. This
article describes various general errors that might occur, and it suggests ways to resolve
them.
General errors
Issue
Customers with a large resource hierarchy may get the following message when
querying the Management Groups - Get REST API with a combination of $expand and
$recurse parameters:
Output
The response of the message was too large. Use another API or other
workarounds. See [Link] for more info.
Cause
The Get management group REST API doesn't return results if the payload is larger than
15 MB. This REST API is intended to get details for a single management group.
Resolution
There are several methods of dealing with a response that is too large:
Use the Management Groups - Get Descendants REST API. This API supports
pagination.
If looking for a single management group, remove the $expand and $recurse
parameters from the request to reduce the response size.
Next steps
If you didn't see your problem or are unable to solve your issue, visit one of the
following channels for more support:
Commands
Name Description Type Status
az account management- List all entities for the authenticated user. Core GA
group entities list
az account management- Get all the hierarchy settings defined at the Core GA
group hierarchy-settings Management Group level.
list
group list
Azure CLI
Examples
Check if a Management Group Name is Valid.
Azure CLI
Required Parameters
--name -n
Global Parameters
--debug
--help -h
--only-show-errors
--output -o
Output format.
accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query
--subscription
Azure CLI
Examples
Create a new management group.
Azure CLI
Azure CLI
Azure CLI
Create a new management group with a specific display name and parent.
Azure CLI
Required Parameters
--name -n
Optional Parameters
--display-name -d
Sets the display name of the management group. If null, the group name is set as
the display name.
--no-register
--parent -p
Sets the parent of the management group. Can be the fully qualified id or the name
of the management group. If null, the root tenant group is set as the parent.
Global Parameters
--debug
--help -h
--only-show-errors
--output -o
Output format.
accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query
--subscription
--verbose
Azure CLI
Examples
Delete an existing management group
Azure CLI
Required Parameters
--name -n
Name of the management group.
Optional Parameters
--no-register
Global Parameters
--debug
--help -h
--only-show-errors
--output -o
Output format.
accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query
--subscription
--verbose
Azure CLI
Examples
List all management groups
Azure CLI
Optional Parameters
--no-register
Global Parameters
--debug
--help -h
--only-show-errors
--output -o
Output format.
accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query
--subscription
--verbose
Azure CLI
Examples
Get a management group.
Azure CLI
Azure CLI
az account management-group show --name GroupName -e
Azure CLI
Required Parameters
--name -n
Name of the management group (the last segment of the resource ID). Do not use
display name.
Optional Parameters
--expand -e
--no-register
--recurse -r
Global Parameters
--debug
--help -h
Show this help message and exit.
--only-show-errors
--output -o
Output format.
accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query
--subscription
--verbose
Azure CLI
Examples
Update an existing management group with a specific display name.
Azure CLI
Azure CLI
Update an existing management group with a specific display name and parent.
Azure CLI
Required Parameters
--name -n
Optional Parameters
--add
Add an object to a list of objects by specifying a path and key value pairs. Example: -
-add [Link] <key=value, string or JSON string>.
default value: []
--display-name -d
Updates the display name of the management group. If null, no change is made.
--force-string
When using 'set' or 'add', preserve string literals instead of attempting to convert to
JSON.
default value: False
--parent -p
Update the parent of the management group. Can be the fully qualified id or the
name of the management group. If null, no change is made.
--remove
--set
Update an object by specifying a property path and value to set. Example: --set
property1.property2=.
default value: []
Global Parameters
--debug
--help -h
--only-show-errors
--output -o
Output format.
accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query
JMESPath query string. See [Link] for more information and
examples.
--subscription
--verbose
This topic displays help topics for the Azure Resource Manager Cmdlets.
Active Directory
Add-AzADAppPermission Adds an API permission.
Get-AzADApplication Lists entities from applications or get entity from applications by key
Get-AzADGroup Lists entities from groups or get entity from groups by key
Get-AzADGroupOwner The owners of the group. Limited to 100 owners. Nullable. If this property is not specified when creating a Microsoft 365 group,
the calling user is automatically assigned as the group owner. Supports $filter (/$count eq 0, /$count ne 0, /$count eq 1,
/$count ne 1). Supports $expand including nested $select. For example, /groups?
$filter=startsWith(displayName,'Role')&$select=id,displayName&$expand=owners($select=id,userPrincipalName,displayName).
Get-AzADServicePrincipal Lists entities from service principals or get entity from service principals by key
Get-AzADSpCredential Lists key credentials and password credentials for an service principal.
Get-AzADUser Lists entities from users or get entity from users by key
Remove-AzADGroupMember Deletes member from group Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for
all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security
groups) Read-only. Nullable. Supports $expand.
Managed Applications
Get-AzManagedApplication Gets managed applications
Policy
Get-AzPolicyAlias Get-AzPolicyAlias retrieves and outputs Azure provider resource types that have aliases defined and
match the given parameter values. If no parameters are provided, all provider resource types that
contain an alias will be output. The -ListAvailable switch modifies this behavior by listing all matching
resource types including those without aliases.
Get-AzRoleManagementPolicy Get the specified role management policy for a resource scope
Get-AzRoleManagementPolicyAssignment Get the specified role management policy assignment for a resource scope
Resources
Export-AzResourceGroup Captures a resource group as a template and saves it to a file.
Get-AzDenyAssignment Lists Azure RBAC deny assignments at the specified scope. By default it lists all deny assignments in
the selected Azure subscription. Use respective parameters to list deny assignments to a specific
user, or to list deny assignments on a specific resource group or resource.
The cmdlet may call below Microsoft Graph API according to input parameters:
GET /directoryObjects/{id}
POST /directoryObjects/getByIds
Get-AzLocation Gets all locations and the supported resource providers for each location.
Get- Gets a template What-If result for a deployment at management group scope.
AzManagementGroupDeploymentWhatIfResult
Get-AzManagementGroupNameAvailability Checks if the Management Group name is available in the Tenant and a valid name.
Get-AzPrivateLinkAssociation Gets all the Azure Resource Management Private Link Association(s).
Get-AzProviderOperation Gets the operations for an Azure resource provider that are securable using Azure RBAC.
Get-AzRoleAssignment Lists Azure RBAC role assignments at the specified scope. By default it lists all role assignments in
the selected Azure subscription. Use respective parameters to list assignments to a specific user, or
to list assignments on a specific resource group or resource.
The cmdlet may call below Microsoft Graph API according to input parameters:
GET /users/{id}
GET /servicePrincipals/{id}
GET /groups/{id}
GET /directoryObjects/{id}
POST /directoryObjects/getByIds
Please notice that this cmdlet will mark ObjectType as Unknown in output if the object of role
assignment is not found or current account has insufficient privileges to get object type.
Get-AzRoleAssignmentSchedule Get the specified role assignment schedule for a resource scope
Get-AzRoleDefinition Lists all Azure RBAC roles that are available for assignment.
Get-AzRoleEligibilitySchedule Get the specified role eligibility schedule for a resource scope
Get-AzRoleEligibleChildResource Get the child resources of a resource on which user has eligible access
Get-AzTag Gets predefined Azure tags | Gets the entire set of tags on a resource or subscription.
New-AzRoleAssignment Assigns the specified RBAC role to the specified principal, at the specified scope.
The cmdlet may call below Microsoft Graph API according to input parameters:
GET /users/{id}
GET /servicePrincipals/{id}
GET /groups/{id}
GET /directoryObjects/{id}
Please notice that this cmdlet will mark ObjectType as Unknown in output if the object of role
assignment is not found or current account has insufficient privileges to get object type.
New-AzRoleDefinition Creates a custom role in Azure RBAC. Provide either a JSON role definition file or a PSRoleDefinition
object as input. First, use the Get-AzRoleDefinition command to generate a baseline role definition
object. Then, modify its properties as required. Finally, use this command to create a custom role
using role definition.
New-AzTag Creates a predefined Azure tag or adds values to an existing tag | Creates or updates the entire set
of tags on a resource or subscription.
Remove-AzRoleAssignment Removes a role assignment to the specified principal who is assigned to a particular role at a
particular scope.
The cmdlet may call below Microsoft Graph API according to input parameters:
GET /users/{id}
GET /servicePrincipals/{id}
GET /groups/{id}
GET /directoryObjects/{id}
POST /directoryObjects/getByIds
Please notice that this cmdlet will mark ObjectType as Unknown in output if the object of role
assignment is not found or current account has insufficient privileges to get object type.
Remove-AzRoleDefinition Deletes a custom role in Azure RBAC. The role to be deleted is specified using the Id property of the
role. Delete will fail if there are existing role assignments made to the custom role.
Remove-AzTag Deletes predefined Azure tags or values | Deletes the entire set of tags on a resource or subscription.
The cmdlet may call below Microsoft Graph API according to input parameters:
GET /users/{id}
GET /servicePrincipals/{id}
GET /groups/{id}
GET /directoryObjects/{id}
POST /directoryObjects/getByIds
Please notice that this cmdlet will mark ObjectType as Unknown in output if the object of role
assignment is not found or current account has insufficient privileges to get object type.
Set-AzRoleDefinition Modifies a custom role in Azure RBAC. Provide the modified role definition either as a JSON file or as
a PSRoleDefinition. First, use the Get-AzRoleDefinition command to retrieve the custom role that you
wish to modify. Then, modify the properties that you wish to change. Finally, save the role definition
using this command.
Packages - legacy
Reference Package Source
Methods
beginCreateOrUpdate(string, Create or update a management group. If a management group
CreateManagementGroup is already created and a subsequent create request is issued with
Request, ManagementGroups different properties, the management group properties will be
CreateOrUpdateOptional updated.
Params)
Method Details
beginCreateOrUpdate(string, CreateManagementGroup
Request, ManagementGroupsCreateOrUpdateOptional
Params)
Create or update a management group. If a management group is already created
and a subsequent create request is issued with different properties, the management
group properties will be updated.
TypeScript
Parameters
groupId string
Management Group ID.
createManagementGroupRequest CreateManagementGroupRequest
Management group creation parameters.
options ManagementGroupsCreateOrUpdateOptionalParams
The options parameters.
Returns
Promise<PollerLike<PollOperationState<ManagementGroup>,
ManagementGroup>>
beginCreateOrUpdateAndWait(string, Create
ManagementGroupRequest, ManagementGroupsCreate
OrUpdateOptionalParams)
Create or update a management group. If a management group is already created
and a subsequent create request is issued with different properties, the management
group properties will be updated.
TypeScript
function beginCreateOrUpdateAndWait(groupId: string,
createManagementGroupRequest: CreateManagementGroupRequest, options?:
ManagementGroupsCreateOrUpdateOptionalParams): Promise<ManagementGroup>
Parameters
groupId string
Management Group ID.
createManagementGroupRequest CreateManagementGroupRequest
Management group creation parameters.
options ManagementGroupsCreateOrUpdateOptionalParams
The options parameters.
Returns
Promise<ManagementGroup>
beginDelete(string, ManagementGroupsDeleteOptional
Params)
Delete management group. If a management group contains child resources, the
request will fail.
TypeScript
Parameters
groupId string
Management Group ID.
options ManagementGroupsDeleteOptionalParams
The options parameters.
Returns
Promise<PollerLike<PollOperationState<ManagementGroupsDeleteResponse>,
ManagementGroupsDeleteResponse>>
beginDeleteAndWait(string, ManagementGroupsDelete
OptionalParams)
Delete management group. If a management group contains child resources, the
request will fail.
TypeScript
Parameters
groupId string
Management Group ID.
options ManagementGroupsDeleteOptionalParams
The options parameters.
Returns
Promise<ManagementGroupsDeleteResponse>
get(string, ManagementGroupsGetOptionalParams)
Get the details of the management group.
TypeScript
Parameters
groupId string
Management Group ID.
options ManagementGroupsGetOptionalParams
The options parameters.
Returns
Promise<ManagementGroup>
list(ManagementGroupsListOptionalParams)
List management groups for the authenticated user.
TypeScript
Parameters
options ManagementGroupsListOptionalParams
The options parameters.
Returns
PagedAsyncIterableIterator<ManagementGroupInfo, ManagementGroupInfo[],
PageSettings>
listDescendants(string, ManagementGroupsGet
DescendantsOptionalParams)
List all entities that descend from a management group.
TypeScript
Parameters
groupId string
Management Group ID.
options ManagementGroupsGetDescendantsOptionalParams
The options parameters.
Returns
PagedAsyncIterableIterator<DescendantInfo, DescendantInfo[], PageSettings>
update(string, PatchManagementGroupRequest,
ManagementGroupsUpdateOptionalParams)
Update a management group.
TypeScript
Parameters
groupId string
Management Group ID.
patchGroupRequest PatchManagementGroupRequest
Management group patch parameters.
options ManagementGroupsUpdateOptionalParams
The options parameters.
Returns
Promise<ManagementGroup>
managementgroups Package
Reference
Packages
aio
models
operations
Classes
ManagementGroupsAPI The Azure Management Groups API enables consolidation of multiple
subscriptions/resources into an organizational hierarchy and centrally manage access
control, policies, alerting and reporting for those resources.
vartype management_groups:
[Link]
vartype management_group_subscriptions:
[Link]
vartype hierarchy_settings:
[Link]
keyword int polling_interval: Default waiting time between two polls for LRO operations
if no Retry-After header is present.
Management Groups
Article • 10/31/2023
Management groups enable you to manage access, policies, and compliance for your
Azure subscriptions. For an introduction, see What are Azure management groups?.
See also
What are Azure management groups?
Quickstart: Create a management group with REST API
[Link]
managementGroups
Article • 08/11/2023
Use the scope property on this resource to set the scope for this resource. See Set scope on
extension resources in Bicep.
The managementGroups resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Remarks
When deployed at tenant scope, don't set the scope property. See create management
groups with tenant deployments in Bicep file or ARM templates.
When deployed at other scopes, set the scope property to tenant() for Bicep files or / for
ARM templates. See create management groups with management group deployments in
Bicep file or ARM templates.
Resource format
To create a [Link]/managementGroups resource, add the following Bicep
to your template.
Bicep
Property values
managementGroups
CreateManagementGroupPropertiesOrManagementGroupProp...
CreateManagementGroupDetailsOrManagementGroupDetails
CreateParentGroupInfoOrParentGroupInfo
Name Description Value
id The fully qualified ID for the parent management group. For example, string
/providers/[Link]/managementGroups/0000000-0000-0000-0000-
000000000000
Quickstart templates
The following quickstart templates deploy this resource type.
Template Description
Create a New Management Group This template is a tenant level template that will
create a new management group.