{ "properties": { "displayName": "Azure SQL Database should have Microsoft Entra-only authentication enabled", "description": "Require Azure SQL logical servers to use Microsoft Entra-only authentication. This policy doesn't block servers from being created with local authentication enabled. It does block local authentication from being enabled on resources after create. Consider using the 'Microsoft Entra-only authentication' initiative instead to require both. Learn more at: https://aka.ms/adonlycreate.", "policyType": "BuiltIn", "mode": "All", "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" } }, "policyRule": { "if": { "allOf": [ { "field": "type", "equals": "Microsoft.Sql/servers/azureADOnlyAuthentications" }, { "value": "[resourcegroup().managedBy]", "notContains": "/providers/Microsoft.Synapse/" }, { "anyOf": [ { "field": "Microsoft.Sql/servers/azureADOnlyAuthentications/azureADOnlyAuthentication", "exists": false }, { "field": "Microsoft.Sql/servers/azureADOnlyAuthentications/azureADOnlyAuthentication", "equals": false } ] } ] }, "then": { "effect": "[parameters('effect')]" } }, "versions": [ "1.0.0" ] }, "id": "/providers/Microsoft.Authorization/policyDefinitions/b3a22bc9-66de-45fb-98fa-00f5df42f41a", "name": "b3a22bc9-66de-45fb-98fa-00f5df42f41a" }