Defining a custom role for a Subscription or a Management group that allows all actions will give them the same capabilities as the built-in Owner role. It’s recommended to limit the number of subscription owners in order to mitigate the risk of being breached by a compromised owner.
This rule raises an issue when a custom role has an assignable scope set to a Subscription or a Management Group and allows all actions
(*) ¨
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Authorization/roleDefinitions",
"apiVersion": "2022-04-01",
"properties": {
"permissions": [
{
"actions": ["*"],
"notActions": []
}
],
"assignableScopes": [
"[subscription().id]"
]
}
}
]
}
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Authorization/roleDefinitions",
"apiVersion": "2022-04-01",
"properties": {
"permissions": [
{
"actions": ["Microsoft.Compute/*"],
"notActions": []
}
],
"assignableScopes": [
"[subscription().id]"
]
}
}
]
}
Here is a list of recommendations that can be followed regarding good usages of roles: