Gallery › SQL › Azure built-in policies
Azure SQL Database should have Microsoft Entra-only authentication
Converted Initiative Version 1.0.0
Require Microsoft Entra-only authentication for Azure SQL Database, disabling local authentication methods. This allows access exclusively via Microsoft Entra identities, enhancing security with modern authentication enhancements including MFA, SSO, and secret-less programmatic access with managed identities.
ConvertTo-Bylaw converted this initiative, and proved that the file compiles back to the same definition.
Azure Policy JSONSqlServer_ADOnlyEnforcement_Deny.json · 54 lines
{
"properties": {
"displayName": "Azure SQL Database should have Microsoft Entra-only authentication",
"policyType": "BuiltIn",
"description": "Require Microsoft Entra-only authentication for Azure SQL Database, disabling local authentication methods. This allows access exclusively via Microsoft Entra identities, enhancing security with modern authentication enhancements including MFA, SSO, and secret-less programmatic access with managed identities.",
"metadata": {
"version": "1.0.0",
"category": "SQL"
},
"Version": "1.0.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Audit"
}
},
"policyDefinitions": [
{
"policyDefinitionReferenceId": "SqlServer_Creation_ADOnlyEnabled",
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/abda6d70-9778-44e7-84a8-06713e6db027",
"definitionVersion": "1.*.*",
"parameters": {
"effect": {
"value": "[parameters('effect')]"
}
}
},
{
"policyDefinitionReferenceId": "SqlServer_ADOnlyEnabled_DisableADAuth",
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/b3a22bc9-66de-45fb-98fa-00f5df42f41a",
"definitionVersion": "1.*.*",
"parameters": {
"effect": {
"value": "[parameters('effect')]"
}
}
}
],
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policySetDefinitions/a55e4a7e-1b9c-43ef-b4b3-642f303804d6",
"name": "a55e4a7e-1b9c-43ef-b4b3-642f303804d6"
}Bylawa55e4a7e-1b9c-43ef-b4b3-642f303804d6.bylaw.ps1 · 36 lines
# Converted from SqlServer_ADOnlyEnforcement_Deny.json by ConvertTo-Bylaw.
Initiative 'a55e4a7e-1b9c-43ef-b4b3-642f303804d6' {
Properties @{
DisplayName = 'Azure SQL Database should have Microsoft Entra-only authentication'
Description = 'Require Microsoft Entra-only authentication for Azure SQL Database, disabling local authentication methods. This allows access exclusively via Microsoft Entra identities, enhancing security with modern authentication enhancements including MFA, SSO, and secret-less programmatic access with managed identities.'
Version = '1.0.0'
Category = 'SQL'
PolicyVersion = '1.0.0'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
PolicyDefinition @{
Id = 'abda6d70-9778-44e7-84a8-06713e6db027'
ReferenceId = 'SqlServer_Creation_ADOnlyEnabled'
Version = '1.*.*'
Parameters = @{
effect = (Param Effect)
}
}
PolicyDefinition @{
Id = 'b3a22bc9-66de-45fb-98fa-00f5df42f41a'
ReferenceId = 'SqlServer_ADOnlyEnabled_DisableADAuth'
Version = '1.*.*'
Parameters = @{
effect = (Param Effect)
}
}
}Members (2)
- Azure SQL logical servers should have Microsoft Entra-only authentication enabled during creation
- Azure SQL Database should have Microsoft Entra-only authentication enabled
Source: built-in-policies/policySetDefinitions/SQL/SqlServer_ADOnlyEnforcement_Deny.json in Azure/azure-policy, under the MIT licence.
Bylaw