|
| 1 | +--- |
| 2 | +title: How to protect your resource hierarchy - Azure Governance |
| 3 | +description: Learn how to protect your resource hierarchy with hierarchy settings that include setting the default management group. |
| 4 | +ms.date: 05/21/2020 |
| 5 | +ms.topic: conceptual |
| 6 | +--- |
| 7 | +# How to protect your resource hierarchy |
| 8 | + |
| 9 | +Your resources, resource groups, subscriptions, management groups, and tenant collectively make up |
| 10 | +your resource hierarchy. Settings at the root management group, such as custom RBAC roles or Azure |
| 11 | +Policy policy assignments, can impact each and every resource in your resource hierarchy. It's |
| 12 | +important to protect the resource hierarchy from changes that could negatively impact all resources. |
| 13 | + |
| 14 | +Management groups now have hierarchy settings that enable the tenant administrator to control these |
| 15 | +behaviors. This article covers each of the available hierarchy settings and how to set them. |
| 16 | + |
| 17 | +## RBAC permissions for hierarchy settings |
| 18 | + |
| 19 | +Configuring any of the hierarchy settings requires the following two RBAC operations on the root |
| 20 | +management group: |
| 21 | + |
| 22 | +- `Microsoft.Management/managementgroups/settings/write` |
| 23 | +- `Microsoft.Management/managementgroups/settings/read` |
| 24 | + |
| 25 | +These operations only allow a user to read and update the hierarchy settings. The operations don't |
| 26 | +provide any other access to the management group hierarchy or resources in the hierarchy. Both of |
| 27 | +these operations are available in the built-in RBAC role **Hierarchy Settings Administrator**. |
| 28 | + |
| 29 | +## Setting - Default management group |
| 30 | + |
| 31 | +By default, a new subscription added within a tenant is added as a member of the root management |
| 32 | +group. If policy assignments, role-based access control (RBAC), and other governance constructs are |
| 33 | +assigned to the root management group, they immediately effect these new subscriptions. For this |
| 34 | +reason, many organizations don't apply these constructs at the root management group even though |
| 35 | +that is the desired place to assign them. In other cases, a more restrictive set of controls is |
| 36 | +desired for new subscriptions, but shouldn't be assigned to all subscriptions. This setting supports |
| 37 | +both use cases. |
| 38 | + |
| 39 | +By allowing the default management group for new subscriptions to be defined, organization-wide |
| 40 | +governance constructs can be applied at the root management group, and a separate management group |
| 41 | +with policy assignments or RBAC assignments more suited to a new subscription can be defined. |
| 42 | + |
| 43 | +To configure this setting, the [Hierarchy Settings](/rest/api/resources/hierarchysettings) REST API |
| 44 | +endpoint is called. To do so, use the following REST API URI and body format. Replace `{rootMgID}` |
| 45 | +with the ID of your root management group and `{defaultGroupID}` with the ID of the management group |
| 46 | +to become the default management group: |
| 47 | + |
| 48 | +- REST API URI |
| 49 | + |
| 50 | + ```http |
| 51 | + PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/{rootMgID}/settings/default?api-version=2020-02-01 |
| 52 | + ``` |
| 53 | + |
| 54 | +- Request Body |
| 55 | + |
| 56 | + ```json |
| 57 | + { |
| 58 | + "properties": { |
| 59 | + "defaultManagementGroup": "/providers/Microsoft.Management/managementGroups/{defaultGroupID}" |
| 60 | + } |
| 61 | + } |
| 62 | + ``` |
| 63 | + |
| 64 | +To set the default management group back to the root management group, use the same endpoint and set |
| 65 | +**defaultManagementGroup** to a value of |
| 66 | +`/providers/Microsoft.Management/managementGroups/{rootMgID}`. |
| 67 | + |
| 68 | +## Setting - Require authorization |
| 69 | + |
| 70 | +Any user, by default, can create new management groups within a tenant. Admins of a tenant may wish |
| 71 | +to only provide these permissions to specific users to maintain consistency and conformity in the |
| 72 | +management group hierarchy. If enabled, a user requires the |
| 73 | +`Microsoft.Management/managementGroups/write` operation on the root management group to create new |
| 74 | +child management groups. |
| 75 | + |
| 76 | +To configure this setting, the [Hierarchy Settings](/rest/api/resources/hierarchysettings) REST API |
| 77 | +endpoint is called. To do so, use the following REST API URI and body format. This value is a |
| 78 | +_boolean_, so provide either **true** or **false** for the value. A value of **true** enables this |
| 79 | +method of protecting your management group hierarchy: |
| 80 | + |
| 81 | +- REST API URI |
| 82 | + |
| 83 | + ```http |
| 84 | + PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/{rootMgID}/settings/default?api-version=2020-02-01 |
| 85 | + ``` |
| 86 | + |
| 87 | +- Request Body |
| 88 | + |
| 89 | + ```json |
| 90 | + { |
| 91 | + "properties": { |
| 92 | + "requireAuthorizationForGroupCreation": true |
| 93 | + } |
| 94 | + } |
| 95 | + ``` |
| 96 | + |
| 97 | +To turn the setting back off, use the same endpoint and set |
| 98 | +**requireAuthorizationForGroupCreation** to a value of **false**. |
| 99 | + |
| 100 | +## Next steps |
| 101 | + |
| 102 | +To learn more about management groups, see: |
| 103 | + |
| 104 | +- [Create management groups to organize Azure resources](../create.md) |
| 105 | +- [How to change, delete, or manage your management groups](../manage.md) |
0 commit comments