Gallery › Synapse › Azure built-in policies
Synapse Workspaces should use only Microsoft Entra identities for authentication during workspace creation
Converted Policy Audit Deny Disabled Mode indexed Version 1.2.0
Require Synapse Workspaces to be created with Microsoft Entra-only authentication. This policy doesn't block local authentication from being re-enabled on resources after create. Consider using the 'Microsoft Entra-only authentication' initiative instead to require both. Learn more at: https://aka.ms/Synapse.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONSynaspeWorkspaceAadOnlyAuthentication_Audit.json · 83 lines
{
"properties": {
"displayName": "Synapse Workspaces should use only Microsoft Entra identities for authentication during workspace creation",
"description": "Require Synapse Workspaces to be created with Microsoft Entra-only authentication. This policy doesn't block local authentication from being re-enabled on resources after create. Consider using the 'Microsoft Entra-only authentication' initiative instead to require both. Learn more at: https://aka.ms/Synapse.",
"policyType": "BuiltIn",
"mode": "indexed",
"metadata": {
"version": "1.2.0",
"category": "Synapse"
},
"version": "1.2.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.Synapse/workspaces"
},
{
"anyOf": [
{
"field": "Microsoft.Synapse/workspaces/extraProperties",
"exists": false
},
{
"value": "[if(empty(field('Microsoft.Synapse/workspaces/extraProperties')), 0, length(intersection(field('Microsoft.Synapse/workspaces/extraProperties'), createObject('WorkspaceType', 'Normal'))))]",
"equals": 1
}
]
},
{
"anyOf": [
{
"field": "Microsoft.Synapse/workspaces/azureADOnlyAuthentication",
"exists": false
},
{
"field": "Microsoft.Synapse/workspaces/azureADOnlyAuthentication",
"equals": false
},
{
"allOf": [
{
"field": "Microsoft.Synapse/workspaces/settings",
"exists": true
},
{
"value": "[if(empty(field('Microsoft.Synapse/workspaces/settings')), 0, length(intersection(field('Microsoft.Synapse/workspaces/settings'), createObject('azureADOnlyAuthentication', createObject('value', 'true', 'state', 'Inconsistent')))))]",
"equals": 1
}
]
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.2.0",
"1.1.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/2158ddbe-fefa-408e-b43f-d4faef8ff3b8",
"name": "2158ddbe-fefa-408e-b43f-d4faef8ff3b8"
}Bylaw2158ddbe-fefa-408e-b43f-d4faef8ff3b8.bylaw.ps1 · 46 lines
# Converted from SynaspeWorkspaceAadOnlyAuthentication_Audit.json by ConvertTo-Bylaw.
Policy '2158ddbe-fefa-408e-b43f-d4faef8ff3b8' {
Properties @{
DisplayName = 'Synapse Workspaces should use only Microsoft Entra identities for authentication during workspace creation'
Description = 'Require Synapse Workspaces to be created with Microsoft Entra-only authentication. This policy doesn''t block local authentication from being re-enabled on resources after create. Consider using the ''Microsoft Entra-only authentication'' initiative instead to require both. Learn more at: https://aka.ms/Synapse.'
Version = '1.2.0'
Category = 'Synapse'
PolicyVersion = '1.2.0'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Synapse/workspaces' {
When {
AnyOf {
Field extraProperties | Must -Not -Exist
Arm '[if(empty(field(''Microsoft.Synapse/workspaces/extraProperties'')), 0, length(intersection(field(''Microsoft.Synapse/workspaces/extraProperties''), createObject(''WorkspaceType'', ''Normal''))))]' | Must -Be 1
}
}
Require 'azureADOnlyAuthentication exists' {
Field azureADOnlyAuthentication | Must -Exist
}
Require 'azureADOnlyAuthentication is not false' {
Field azureADOnlyAuthentication | Must -Not -Be $false -IfPresent
}
Require 'settings is as required' {
AnyOf {
Field settings | Must -Not -Exist
Arm '[if(empty(field(''Microsoft.Synapse/workspaces/settings'')), 0, length(intersection(field(''Microsoft.Synapse/workspaces/settings''), createObject(''azureADOnlyAuthentication'', createObject(''value'', ''true'', ''state'', ''Inconsistent'')))))]' | Must -Not -Be 1
}
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Synapse/SynaspeWorkspaceAadOnlyAuthentication_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw