Gallery › Security Center › Azure built-in policies
Configure Microsoft Defender threat protection for AI Services
Converted Policy DeployIfNotExists Disabled Mode All Version 1.1.0
New capabilities are continuously being added to threat protection for AI Services, which may require the user's explicit enablement. Use this policy to make sure all new capabilities will be enabled.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONASC_Azure_Defender_AI_Full_Features_DINE.json · 165 lines
{
"properties": {
"displayName": "Configure Microsoft Defender threat protection for AI Services",
"policyType": "BuiltIn",
"mode": "All",
"description": "New capabilities are continuously being added to threat protection for AI Services, which may require the user's explicit enablement. Use this policy to make sure all new capabilities will be enabled.",
"metadata": {
"version": "1.1.0",
"category": "Security Center"
},
"version": "1.1.0",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "DeployIfNotExists",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"DeployIfNotExists",
"Disabled"
]
},
"isAIPromptEvidenceEnabled": {
"type": "String",
"metadata": {
"displayName": "AI Prompt Evidence Enabled",
"description": "Controls the AI prompt evidence feature, which exposes the prompts passed between the user and the model for deeper analysis of AI-related alerts. The prompt snippets will include only segments of the user prompt or model response that were deemed suspicious and relevant for security classifications. While sensitive data or secrets are redacted, customer conversations may be deemed sensitive in nature. The evidence will be available through the Defender portal as part of each alert."
},
"allowedValues": [
"true",
"false"
],
"defaultValue": "true"
},
"isAIPromptSharingWithPurviewEnabled": {
"type": "String",
"metadata": {
"displayName": "AI Data Security Enabled",
"description": "Controls the AI data security feature, allowing Microsoft Purview to access, process, and store prompts and responses, including metadata for security and compliance purposes such as sensitive information type (SIT) classification, reporting in Microsoft Purview Data Security Posture Management for AI, Audit, Insider Risk Management, Communication Compliance, and eDiscovery"
},
"allowedValues": [
"true",
"false"
],
"defaultValue": "true"
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Resources/subscriptions"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Security/pricings",
"name": "AI",
"deploymentScope": "subscription",
"existenceScope": "subscription",
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
],
"existenceCondition": {
"allOf": [
{
"field": "Microsoft.Security/pricings/pricingTier",
"equals": "Standard"
},
{
"count": {
"field": "Microsoft.Security/pricings/extensions[*]",
"where": {
"allOf": [
{
"field": "Microsoft.Security/pricings/extensions[*].name",
"equals": "AIPromptEvidence"
},
{
"field": "Microsoft.Security/pricings/extensions[*].isEnabled",
"equals": "[parameters('isAIPromptEvidenceEnabled')]"
}
]
}
},
"equals": 1
},
{
"count": {
"field": "Microsoft.Security/pricings/extensions[*]",
"where": {
"allOf": [
{
"field": "Microsoft.Security/pricings/extensions[*].name",
"equals": "AIPromptSharingWithPurview"
},
{
"field": "Microsoft.Security/pricings/extensions[*].isEnabled",
"equals": "[parameters('isAIPromptSharingWithPurviewEnabled')]"
}
]
}
},
"equals": 1
}
]
},
"deployment": {
"location": "westeurope",
"properties": {
"mode": "incremental",
"parameters": {
"isAIPromptEvidenceEnabled": {
"value": "[parameters('isAIPromptEvidenceEnabled')]"
},
"isAIPromptSharingWithPurviewEnabled": {
"value": "[parameters('isAIPromptSharingWithPurviewEnabled')]"
}
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"isAIPromptEvidenceEnabled": {
"type": "String"
},
"isAIPromptSharingWithPurviewEnabled": {
"type": "String"
}
},
"resources": [
{
"type": "Microsoft.Security/pricings",
"apiVersion": "2023-01-01",
"name": "AI",
"properties": {
"pricingTier": "Standard",
"extensions": [
{
"name": "AIPromptEvidence",
"isEnabled": "[parameters('isAIPromptEvidenceEnabled')]"
},
{
"name": "AIPromptSharingWithPurview",
"isEnabled": "[parameters('isAIPromptSharingWithPurviewEnabled')]"
}
]
}
}
]
}
}
}
}
}
},
"versions": [
"1.1.0",
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/359a48a3-351a-4618-bb32-f1628645694b",
"name": "359a48a3-351a-4618-bb32-f1628645694b"
}Bylaw359a48a3-351a-4618-bb32-f1628645694b.bylaw.ps1 · 57 lines
# Converted from ASC_Azure_Defender_AI_Full_Features_DINE.json by ConvertTo-Bylaw.
Policy '359a48a3-351a-4618-bb32-f1628645694b' {
Properties @{
DisplayName = 'Configure Microsoft Defender threat protection for AI Services'
Description = 'New capabilities are continuously being added to threat protection for AI Services, which may require the user''s explicit enablement. Use this policy to make sure all new capabilities will be enabled.'
Version = '1.1.0'
Category = 'Security Center'
PolicyVersion = '1.1.0'
Mode = 'All'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'DeployIfNotExists'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Parameter IsAIPromptEvidenceEnabled @{
AllowedValues = @('true', 'false')
Default = 'true'
DisplayName = 'AI Prompt Evidence Enabled'
Description = 'Controls the AI prompt evidence feature, which exposes the prompts passed between the user and the model for deeper analysis of AI-related alerts. The prompt snippets will include only segments of the user prompt or model response that were deemed suspicious and relevant for security classifications. While sensitive data or secrets are redacted, customer conversations may be deemed sensitive in nature. The evidence will be available through the Defender portal as part of each alert.'
}
Parameter IsAIPromptSharingWithPurviewEnabled @{
AllowedValues = @('true', 'false')
Default = 'true'
DisplayName = 'AI Data Security Enabled'
Description = 'Controls the AI data security feature, allowing Microsoft Purview to access, process, and store prompts and responses, including metadata for security and compliance purposes such as sensitive information type (SIT) classification, reporting in Microsoft Purview Data Security Posture Management for AI, Audit, Insider Risk Management, Communication Compliance, and eDiscovery'
}
Resource 'Microsoft.Resources/subscriptions'
DeployIfNotExists 'Microsoft.Security/pricings' -Role 'Owner' -Name 'AI' -ExistenceScope Subscription -Effect (Param Effect) {
Require 'pricingTier, extensions, name and 1 more are as required' {
Field pricingTier | Must -Be 'Standard'
Count 'extensions[*]' -Where {
Field name | Must -Be 'AIPromptEvidence'
Field isEnabled | Must -Be (Param IsAIPromptEvidenceEnabled)
} | Must -Be 1
Count 'extensions[*]' -Where {
Field name | Must -Be 'AIPromptSharingWithPurview'
Field isEnabled | Must -Be (Param IsAIPromptSharingWithPurviewEnabled)
} | Must -Be 1
}
Deployment @{
TemplateFile = './templates/359a48a3-351a-4618-bb32-f1628645694b.json'
Scope = 'Subscription'
Location = 'westeurope'
Parameters = [ordered]@{
isAIPromptEvidenceEnabled = (Param IsAIPromptEvidenceEnabled)
isAIPromptSharingWithPurviewEnabled = (Param IsAIPromptSharingWithPurviewEnabled)
}
}
}
}Its deployment templates are written beside it:
templates/359a48a3-351a-4618-bb32-f1628645694b.json
Source: built-in-policies/policyDefinitions/Security Center/ASC_Azure_Defender_AI_Full_Features_DINE.json in Azure/azure-policy, under the MIT licence.
Bylaw