Gallery › Regulatory Compliance › Azure built-in policies
Restrict access to privileged accounts
Converted Policy Disabled Manual Mode All Version 1.1.0
CMA_0446 - Restrict access to privileged accounts
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONCMA_0446.json · 45 lines
{
"properties": {
"displayName": "Restrict access to privileged accounts",
"policyType": "BuiltIn",
"mode": "All",
"description": "CMA_0446 - Restrict access to privileged accounts",
"metadata": {
"version": "1.1.0",
"category": "Regulatory Compliance",
"additionalMetadataId": "/providers/Microsoft.PolicyInsights/policyMetadata/CMA_0446"
},
"version": "1.1.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Manual",
"Disabled"
],
"defaultValue": "Manual"
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Resources/subscriptions"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"defaultState": "Unknown"
}
}
},
"versions": [
"1.1.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/873895e8-0e3a-6492-42e9-22cd030e9fcd",
"name": "873895e8-0e3a-6492-42e9-22cd030e9fcd"
}Bylaw873895e8-0e3a-6492-42e9-22cd030e9fcd.bylaw.ps1 · 24 lines
# Converted from CMA_0446.json by ConvertTo-Bylaw.
Policy '873895e8-0e3a-6492-42e9-22cd030e9fcd' {
Properties @{
DisplayName = 'Restrict access to privileged accounts'
Description = 'CMA_0446 - Restrict access to privileged accounts'
Version = '1.1.0'
Category = 'Regulatory Compliance'
PolicyVersion = '1.1.0'
Mode = 'All'
Metadata = [ordered]@{ additionalMetadataId = '/providers/Microsoft.PolicyInsights/policyMetadata/CMA_0446' }
}
Parameter Effect @{
AllowedValues = @('Manual', 'Disabled')
Default = 'Manual'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Resources/subscriptions'
Manual -DefaultState Unknown -Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Regulatory Compliance/CMA_0446.json in Azure/azure-policy, under the MIT licence.
Bylaw