An Azure service that enables users to identify content that is potentially offensive, risky, or otherwise undesirable. Previously known as Azure Content Moderator.
Hey @Vu Thanh Trung ,
At the moment, there isn’t a dedicated “Blocked Prompts” page or dashboard in Defender or Purview. However, you can achieve this by enabling diagnostic logging and using Azure Monitor / Log Analytics.
- Enable Diagnostic Logging
In the Azure portal:
- Go to your Azure AI Foundry or Azure OpenAI resource
- Navigate to Monitoring → Diagnostic settings
- Select + Add diagnostic setting
- Enable the relevant content filter logs (for example,
ContentFilterLogsorOpenAIContentFilterLogs) - Choose a destination such as:
- Log Analytics Workspace (recommended)
- Storage Account
- Event Hub
- Review Captured Fields
Once the logs are flowing into Log Analytics, you can review details such as:
- Prompt / input text
- Content filter category (Violence, Hate, Sexual, Self-Harm, etc.)
- Severity level (Low, Medium, High)
- Block reason
- Custom blocklist term or policy name (if applicable)
- Query Logs in Log Analytics
You can use a query similar to the following:
OpenAIContentFilterLogs
| project TimeGenerated,
prompt=tostring(properties.prompt),
category=tostring(properties.category),
severity=tostring(properties.severity),
blocklistTerm=tostring(properties.blocklistTerm)
| sort by TimeGenerated desc
This helps you view blocked prompts along with timestamps and filtering reasons.
I hope this helps point you in the right direction. Please share more details about your setup if you need more specific guidance.
Thank you!