Gallery › SQL › Azure built-in policies
A Microsoft Entra administrator should be provisioned for MySQL servers
Converted Policy AuditIfNotExists Disabled Mode Indexed Version 1.1.1
Audit provisioning of a Microsoft Entra administrator for your MySQL server to enable Microsoft Entra authentication. Microsoft Entra authentication enables simplified permission management and centralized identity management of database users and other Microsoft services
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONMySQL_AuditServerADAdmins_Audit.json · 45 lines
{
"properties": {
"displayName": "A Microsoft Entra administrator should be provisioned for MySQL servers",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Audit provisioning of a Microsoft Entra administrator for your MySQL server to enable Microsoft Entra authentication. Microsoft Entra authentication enables simplified permission management and centralized identity management of database users and other Microsoft services",
"metadata": {
"version": "1.1.1",
"category": "SQL"
},
"version": "1.1.1",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "AuditIfNotExists",
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.DBforMySQL/servers"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.DBforMySQL/servers/administrators"
}
}
},
"versions": [
"1.1.1",
"1.1.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/146412e9-005c-472b-9e48-c87b72ac229e",
"name": "146412e9-005c-472b-9e48-c87b72ac229e"
}Bylaw146412e9-005c-472b-9e48-c87b72ac229e.bylaw.ps1 · 24 lines
# Converted from MySQL_AuditServerADAdmins_Audit.json by ConvertTo-Bylaw.
Policy '146412e9-005c-472b-9e48-c87b72ac229e' {
Properties @{
DisplayName = 'A Microsoft Entra administrator should be provisioned for MySQL servers'
Description = 'Audit provisioning of a Microsoft Entra administrator for your MySQL server to enable Microsoft Entra authentication. Microsoft Entra authentication enables simplified permission management and centralized identity management of database users and other Microsoft services'
Version = '1.1.1'
Category = 'SQL'
PolicyVersion = '1.1.1'
Mode = 'Indexed'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'AuditIfNotExists'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.DBforMySQL/servers'
AuditIfNotExists 'Microsoft.DBforMySQL/servers/administrators' -Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/SQL/MySQL_AuditServerADAdmins_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw