---
title: "Azure AI Content Safety for Python: review, setup & limitations · Undominated.ai"
canonical: https://undominated.ai/skills/microsoft-azure-ai-contentsafety-py/
description: "Pins Microsoft's Python Content Safety skill, which keeps new code on Entra credentials and can stop analysis when a blocklist matches."
---

# Azure AI Content Safety for Python: review, setup & limitations · Undominated.ai

> Pins Microsoft's Python Content Safety skill, which keeps new code on Entra credentials and can stop analysis when a blocklist matches.

[← Explore all skills](/skills/)

CONTENT MODERATION / Microsoft

# Azure AI Content Safety for Python

Pins Microsoft's Python Content Safety skill, which keeps new code on Entra credentials and can stop analysis when a blocklist matches.

 [See setup guidance ↓](#setup)[Original source ↗](https://github.com/microsoft/skills/tree/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-python/skills/azure-ai-contentsafety-py)

SOURCE REVIEW

 Reviewed 2026-10-15
 Evidence 6 linked sources
 Publisher Microsoft
 Licence [MIT ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/LICENSE)
 Revision fc164ba1d7a0
 [Read what was—and wasn’t—checked ↓](#review)

“Azure AI Content Safety SDK for Python. Use for detecting harmful content in text and images with multi-severity classification. Triggers: "azure-ai-contentsafety", "ContentSafetyClient", "content moderation", "harmful content", "text analysis", "image analysis". ”

 [Microsoft · upstream description ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-python/skills/azure-ai-contentsafety-py/SKILL.md) Our analysis follows below.

01 / THE REASONING

## Why this made the selection.

 - New code is told to use DefaultAzureCredential, and AzureKeyCredential is limited to an existing keyed deployment that has not been migrated to Entra ID.
- A text analysis can set halt_on_blocklist_hit so a blocklist match stops immediately, and the best-practice list says to use that for immediate rejection and to pre-moderate model output before it is shown.

### A good fit for

 - Moderating text or images when new code must use Entra credentials and a named blocklist match should stop the analysis

### Weigh up before choosing

 - This review did not execute the resource.
- `/plugin install azure-sdk-python@skills` installs the azure-sdk-python plugin named in the plugin README, not this file alone.
- `npx skills add microsoft/skills --skill azure-sdk-python` also names that plugin, not this file alone.
- The repository README's `/plugin install azure@skills` installs a different plugin.
- Blocklist create and item-update examples have no confirmation step and no dry-run.
- The file does not choose a numeric severity cutoff. The first analyze example does not set halt_on_blocklist_hit.
- references/capabilities.md and references/non-hero-scenarios.md were not opened. The skill frontmatter version is 1.0.0.

02 / THE REVIEW RECORD

## What we actually inspected.

Source review has boundaries. A clear record is more useful than a “safe” badge.

### Material inspected

 - .github/plugins/azure-sdk-python/skills/azure-ai-contentsafety-py/SKILL.md
- README.md
- .github/plugins/azure-sdk-python/README.md
- .github/plugins/azure-sdk-python/.claude-plugin/plugin.json
- LICENSE

### Our findings

 - Production DefaultAzureCredential is constrained with AZURE_TOKEN_CREDENTIALS=prod, and API keys are avoided because they bypass Entra audit and rotation.
- AzureKeyCredential is reserved for an existing keyed deployment that has not moved to Entra ID, and CONTENT_SAFETY_KEY is marked as only for that legacy path.
- The blocklist analysis sample sets halt_on_blocklist_hit, and the best practices say to use it for immediate rejection.
- The best practices say to pre-moderate AI outputs before showing them to users.
- Sync and async Content Safety clients must not be mixed, and clients are closed with context managers so token caches are released.

### Not established by this review

 - The resource was not executed and its tools were not called.
- No text or image was analyzed and no blocklist was created or updated.
- The referenced capability and non-hero files were not opened.
- The azure-sdk-python plugin was not installed.
- Not executed: it was not installed or run.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

## Add a skill to your workflow.

[Upstream setup instructions ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-python/README.md)

DOCUMENTED COMMAND

 /plugin install azure-sdk-python@skills Copy command ↗

Copying does not execute this command. It may retrieve a newer version than the reviewed source.

 - The azure-sdk-python plugin README shows `/plugin install azure-sdk-python@skills`. That installs the azure-sdk-python plugin, not this one file.
- The same README shows `npx skills add microsoft/skills --skill azure-sdk-python`, which also names the plugin rather than this file.
- The repository README shows `/plugin marketplace add microsoft/skills` and `/plugin install azure@skills` for a different plugin, plus `npx skills add microsoft/skills` for a repository wizard.

### Before you start

 - The skill shows `pip install azure-ai-contentsafety`. This review did not run it.
- CONTENT_SAFETY_ENDPOINT as named in the skill
- DefaultAzureCredential through Azure CLI, VS Code, Developer CLI, or a managed identity, as the skill describes
- CONTENT_SAFETY_KEY only for the legacy API-key path the skill limits to an unmigrated keyed deployment
- Copilot CLI for the slash-command install line

### Compatibility

GitHub Copilot · GitHub Copilot CLI

### Implementation

python

### Local skill text; Content Safety calls run only if an operator executes them

 - Read the skill text
- Authenticate to Azure only if the operator uses a credential the skill names
- Analyze text or images, or create and update a blocklist, only if the operator runs those client calls
- The image example reads local image.jpg, base64-encodes its bytes and sends them in an analyze_image request; the URL example instead supplies a blob_url.

### Cost model

MIT; no Azure or Python command was run

04 / FOLLOW THE EVIDENCE

## The source trail.

Our notes are separate from the original resource. Check upstream before adopting a new version.

 - [azure-ai-contentsafety-py SKILL.md ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-python/skills/azure-ai-contentsafety-py/SKILL.md) Checked 2026-10-14 https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-python/skills/azure-ai-contentsafety-py/SKILL.md Supports: Entra credential preference, legacy key limit, blocklist halt, and pre-moderation
- [azure-sdk-python plugin README ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-python/README.md) Checked 2026-10-14 https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-python/README.md Supports: /plugin install azure-sdk-python@skills and the npx plugin install line
- [azure-sdk-python plugin.json ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-python/.claude-plugin/plugin.json) Checked 2026-10-14 https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-python/.claude-plugin/plugin.json Supports: plugin name azure-sdk-python and MIT
- [Repository README ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/README.md) Checked 2026-10-14 https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/README.md Supports: MIT statement, Copilot CLI install, and a different azure plugin install line
- [Repository LICENSE ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/LICENSE) Checked 2026-10-14 https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/LICENSE Supports: MIT License
- [Pinned definition rechecked for the 2026-10-15 resource wave ↗](https://raw.githubusercontent.com/microsoft/skills/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-python/skills/azure-ai-contentsafety-py/SKILL.md) Checked 2026-10-15 https://raw.githubusercontent.com/microsoft/skills/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-python/skills/azure-ai-contentsafety-py/SKILL.md Supports: upstreamDescription, access.permissions, review

KEEP COMPARING

## Other approaches to consider.

Related by category or shared topics. These are alternatives to inspect, not a measured quality order.

 [### Azure AI Document Translation for Python ↗ Pins Microsoft's Python document-translation skill, which uses Entra for new clients and limits blob SAS permissions on source and target containers.](/skills/microsoft-azure-ai-translation-document-py/)[### Azure AI Language Conversations for Python ↗ Pins Microsoft's Python conversation-analysis skill, which tells new code to use token credentials and reserves API keys for unmigrated keyed deployments.](/skills/microsoft-azure-ai-language-conversations-py/)[### Azure AI Text Analytics for Python ↗ Pins Microsoft's Python text-analytics skill, which keeps new code on DefaultAzureCredential and reserves API keys for unmigrated keyed deployments.](/skills/microsoft-azure-ai-textanalytics-py/)

 [AI Tools ↗](/tools/)[Skills ↗](/skills/)[Agents ↗](/agents/)[MCP Servers ↗](/mcp-servers/)[Workflows ↗](/workflows/)

## Continue your investigation

 - [Choose a toolkit](/tools/)
- [Inspect execution hosts](/agents/)
- [Check tool access](/mcp-servers/)
- [Check project dependencies](/check-repo/)
