Microsoft Foundry Content Filter Modified or Deleted

Identifies the creation, modification, or deletion of a content filter (RAI policy) or a custom blocklist on a Microsoft Foundry (Azure AI Services) account. Content filters decide which prompt and completion categories, jailbreak attempts, and protected material a model deployment blocks. An adversary with control of the account can weaken or remove these filters so that harmful prompts and outputs are no longer blocked or logged as filtered, which removes a guardrail and the detections that depend on its verdicts.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2026/10/23"
  3integration = ["azure"]
  4maturity = "production"
  5updated_date = "2026/10/23"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Identifies the creation, modification, or deletion of a content filter (RAI policy) or a custom blocklist on a
 11Microsoft Foundry (Azure AI Services) account. Content filters decide which prompt and completion categories,
 12jailbreak attempts, and protected material a model deployment blocks. An adversary with control of the account can
 13weaken or remove these filters so that harmful prompts and outputs are no longer blocked or logged as filtered, which
 14removes a guardrail and the detections that depend on its verdicts.
 15"""
 16false_positives = [
 17    """
 18    AI platform administrators tuning content filter thresholds or blocklists for a new use case. Confirm the change
 19    with the account owner and change records.
 20    """,
 21    """
 22    Infrastructure-as-code deployments that recreate RAI policies on every release. Add exceptions for the service
 23    principals that run these pipelines.
 24    """,
 25]
 26from = "now-9m"
 27index = ["logs-azure.activitylogs-*"]
 28language = "kuery"
 29license = "Elastic License v2"
 30name = "Microsoft Foundry Content Filter Modified or Deleted"
 31note = """## Triage and analysis
 32
 33### Investigating Microsoft Foundry Content Filter Modified or Deleted
 34
 35Microsoft Foundry content filters are stored as RAI policies on the AI Services account
 36(`Microsoft.CognitiveServices/accounts/raiPolicies`) and are referenced by each model deployment. Custom blocklists
 37(`raiBlocklists`) add term-level blocking on top of those policies. This rule fires when a policy or blocklist is
 38written or deleted.
 39
 40### Possible investigation steps
 41
 42- Identify the caller from `azure.activitylogs.identity.authorization.evidence.principal_id`, `user.name`, and
 43  `azure.activitylogs.identity.authorization.evidence.role`.
 44- Review `azure.resource.id` to identify the policy or blocklist name and the account it belongs to, and
 45  `azure.activitylogs.operation_name` to determine whether it was a write or a delete.
 46- Compare the policy with the previous version in the Foundry portal or with `az cognitiveservices account` tooling.
 47  Lowered severity thresholds, disabled prompt shields, or a policy switched to annotate-only mode are the changes of
 48  most concern.
 49- Check whether any deployment on the account was changed to use the modified policy around the same time.
 50- Review `source.ip` and `source.geo.country_name` for the caller and look for other recent changes by the same
 51  principal, such as key listing, diagnostic setting deletion, or new role assignments.
 52- If Microsoft Foundry logs are ingested, look for a drop in filtered or jailbreak-flagged requests after the change.
 53
 54### False positive analysis
 55
 56- Planned content filter tuning by AI platform owners. Confirm with the owner and the change ticket.
 57- Deployment pipelines that rewrite RAI policies. Exclude those service principals by ID.
 58
 59### Response and remediation
 60
 61- If the change is not authorized, restore the previous content filter configuration and reassign it to affected
 62  deployments.
 63- Revoke the caller's sessions, reset its credentials, and review its role assignments on the account.
 64- Restrict `Microsoft.CognitiveServices/accounts/raiPolicies/*` permissions to a small set of administrators.
 65"""
 66references = [
 67    "https://learn.microsoft.com/en-us/azure/ai-foundry/openai/concepts/content-filter",
 68    "https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/content-filters",
 69    "https://www.elastic.co/docs/reference/integrations/azure/activitylogs",
 70]
 71risk_score = 47
 72rule_id = "734c9a40-52e2-4f1d-814e-91bdd69f7ad2"
 73setup = """## Setup
 74
 75This rule requires Azure Activity Logs ingested via the Azure integration (`azure.activitylogs` data stream). RAI
 76policy and blocklist changes are Administrative control-plane events and are logged by default.
 77"""
 78severity = "medium"
 79tags = [
 80    "Domain: Cloud",
 81    "Domain: GenAI",
 82    "Data Source: Azure",
 83    "Data Source: Azure Activity Logs",
 84    "Data Source: Microsoft Foundry",
 85    "Platform: Azure",
 86    "Use Case: Threat Detection",
 87    "Tactic: Defense Evasion",
 88    "Resources: Investigation Guide",
 89    "Rule Type: Custom Query (KQL)",
 90]
 91timestamp_override = "event.ingested"
 92type = "query"
 93
 94query = '''
 95data_stream.dataset: "azure.activitylogs" and
 96azure.activitylogs.operation_name: (
 97    "MICROSOFT.COGNITIVESERVICES/ACCOUNTS/RAIPOLICIES/WRITE" or
 98    "MICROSOFT.COGNITIVESERVICES/ACCOUNTS/RAIPOLICIES/DELETE" or
 99    "MICROSOFT.COGNITIVESERVICES/ACCOUNTS/RAIBLOCKLISTS/WRITE" or
100    "MICROSOFT.COGNITIVESERVICES/ACCOUNTS/RAIBLOCKLISTS/DELETE"
101) and event.outcome: "success"
102'''
103
104
105[[rule.threat]]
106framework = "MITRE ATT&CK"
107[[rule.threat.technique]]
108id = "T1562"
109name = "Impair Defenses"
110reference = "https://attack.mitre.org/techniques/T1562/"
111[[rule.threat.technique.subtechnique]]
112id = "T1562.001"
113name = "Disable or Modify Tools"
114reference = "https://attack.mitre.org/techniques/T1562/001/"
115
116
117
118[rule.threat.tactic]
119id = "TA0005"
120name = "Defense Evasion"
121reference = "https://attack.mitre.org/tactics/TA0005/"
122[[rule.threat_mappings]]
123framework = "MITRE ATLAS"
124version = "2026.09"
125[[rule.threat_mappings.threat]]
126framework = "MITRE ATLAS"
127
128[rule.threat_mappings.threat.tactic]
129id = "AML.TA0007"
130name = "Defense Evasion"
131reference = "https://atlas.mitre.org/tactics/AML.TA0007/"
132
133[rule.investigation_fields]
134field_names = [
135    "@timestamp",
136    "azure.activitylogs.operation_name",
137    "azure.activitylogs.identity.authorization.evidence.principal_id",
138    "azure.activitylogs.identity.authorization.evidence.role",
139    "user.name",
140    "source.ip",
141    "source.geo.country_name",
142    "azure.resource.id",
143    "azure.resource.group",
144    "azure.subscription_id",
145]

Triage and analysis

Investigating Microsoft Foundry Content Filter Modified or Deleted

Microsoft Foundry content filters are stored as RAI policies on the AI Services account (Microsoft.CognitiveServices/accounts/raiPolicies) and are referenced by each model deployment. Custom blocklists (raiBlocklists) add term-level blocking on top of those policies. This rule fires when a policy or blocklist is written or deleted.

Possible investigation steps

  • Identify the caller from azure.activitylogs.identity.authorization.evidence.principal_id, user.name, and azure.activitylogs.identity.authorization.evidence.role.
  • Review azure.resource.id to identify the policy or blocklist name and the account it belongs to, and azure.activitylogs.operation_name to determine whether it was a write or a delete.
  • Compare the policy with the previous version in the Foundry portal or with az cognitiveservices account tooling. Lowered severity thresholds, disabled prompt shields, or a policy switched to annotate-only mode are the changes of most concern.
  • Check whether any deployment on the account was changed to use the modified policy around the same time.
  • Review source.ip and source.geo.country_name for the caller and look for other recent changes by the same principal, such as key listing, diagnostic setting deletion, or new role assignments.
  • If Microsoft Foundry logs are ingested, look for a drop in filtered or jailbreak-flagged requests after the change.

False positive analysis

  • Planned content filter tuning by AI platform owners. Confirm with the owner and the change ticket.
  • Deployment pipelines that rewrite RAI policies. Exclude those service principals by ID.

Response and remediation

  • If the change is not authorized, restore the previous content filter configuration and reassign it to affected deployments.
  • Revoke the caller's sessions, reset its credentials, and review its role assignments on the account.
  • Restrict Microsoft.CognitiveServices/accounts/raiPolicies/* permissions to a small set of administrators.

References

Related rules

to-top