Microsoft Foundry: Where can I see all content-filter-blocked prompts and the reason for each (category or blocklist term)?

Vu Thanh Trung 20 Reputation points
2026-06-03T08:37:08.59+00:00

I have a Microsoft Foundry deployment with a content filter and a custom blocklist. I want a list of all prompts that were blocked, along with the reason each was blocked — specifically which harm category or which custom blocklist term triggered it.

I've searched and can't find a view in Microsoft Defender that shows the blocked prompt content. Is this available in Microsoft Purview instead? If so, how do I set it up?

More generally: is there any view that shows blocked prompts and their reasons? If not, how do I get this from diagnostic logs. Do I need to enable logging beforehand, and does it capture the actual prompt text and which blocklist matched?

Without this option it's really hard to justify creating content-filter when we can't monitor why our prompt might have gotten blocked

Content Safety in Foundry Control Plane
Content Safety in Foundry Control Plane

An Azure service that enables users to identify content that is potentially offensive, risky, or otherwise undesirable. Previously known as Azure Content Moderator.


2 answers

Sort by: Most helpful
  1. Anshika Varshney 15,625 Reputation points Microsoft External Staff Moderator
    2026-06-08T11:05:16.8166667+00:00

    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.

    1. 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, ContentFilterLogs or OpenAIContentFilterLogs)
    • Choose a destination such as:
      • Log Analytics Workspace (recommended)
      • Storage Account
      • Event Hub
    1. 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)
    1. 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!

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-06-03T08:37:22.9566667+00:00

    Microsoft Foundry content filters and custom blocklists do not provide a built-in view that lists each blocked prompt together with the exact triggering harm category or specific blocklist term.

    What is available:

    1. Content filter metrics in Risks & Safety monitoring (classic)
      • Risks & Safety monitoring shows aggregated metrics about content filtering, not individual prompts. The report surfaces:
        1. Total blocked request count and block rate over time.
        2. Blocked requests by category (hate, sexual, self-harm, violence).
        3. Block rate over time by category.
        4. Severity distribution by category (for all flagged content, not only blocked).
        5. Severity rate distribution over time by category.
      • These metrics are intended to help understand trends and adjust configuration, not to inspect specific prompts or matched terms.
      • The documentation explicitly recommends: “Adjust your content filter configuration to further align with business needs and Responsible AI principles.”
    2. Data handling and limitations
      • Prompts and completions are not stored for the purposes of content filtering, and are not used to train, retrain, or improve the content filtering system without user consent.
      • The system runs prompts and completions through classification models to detect harmful content in the four harm categories (hate, sexual, violence, self-harm) with severity levels (safe, low, medium, high), but the documentation does not describe any feature that exposes full prompt text plus the exact matched term or rule per request.
    3. Prompt Shields and indirect attacks
      • Prompt Shields detect user prompt attacks and indirect prompt attacks (for example, attempts to change system rules, role-play attacks, encoding attacks, or malicious instructions embedded in documents). These are categorized (manipulated content, fraud, malware, attempt to change system rules, encoding attacks, etc.), but again the documentation describes classification categories, not a per-request log of blocked prompts and matched terms.
    4. Microsoft Defender or Purview
      • The provided documentation does not describe any integration with Microsoft Defender or Microsoft Purview that would expose:
        • Full blocked prompt text, or
        • The exact custom blocklist term that triggered a block.
      • No setup steps are documented for using Defender or Purview to view blocked prompts for Foundry content filters.
    5. Diagnostic logs
      • Within the provided documentation, there is no description of diagnostic logging that captures:
        • The full prompt text, and
        • The specific blocklist term or harm category per individual request.
      • Only aggregated metrics and category/severity distributions are documented.

    Given the available documentation:

    • There is no documented view (in Foundry, Defender, or Purview) that lists each blocked prompt with the exact reason (harm category or blocklist term).
    • Risks & Safety monitoring can be used to monitor aggregate block counts, categories, and severities over time and then tune content filter configuration accordingly.
    • The system is explicitly designed not to store prompts/completions for content filtering purposes, which limits the availability of per-prompt inspection in the platform.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.