Enabling Defender for AI Services
This lesson explains how to enable the AI services plan, what its components do, and where it fits.
Learning outcomes
After completing this lesson, you will be able to:
- Describe what the plan covers.
- Enable the plan on a subscription.
- Explain the components and their limits.
- Distinguish the plan from guardrails and posture management.
What the plan does
Defender for AI Services, also called AI threat protection, is a workload protection plan in Microsoft Defender for Cloud. It watches AI model deployments for threats, and raises alerts that security analysts can investigate. Think of it as doing for a model deployment what Defender for Storage does for a storage account: it adds detection to a resource that already has access controls.
It is generally available, with activity monitoring and prompt evidence as listed features. It covers Azure OpenAI models and Azure AI Model Inference models, and it analyses text tokens only, so images and audio are not scanned. It is not available in Azure Government, Azure operated by 21Vianet, or connected AWS accounts. A 30-day free trial is capped at 75 billion scanned tokens.
Defender for AI Services
Enabling the plan
Enabling the plan needs Owner or Contributor rights, and Defender for Cloud must already be enabled on the subscription. In the Azure portal, open Microsoft Defender for Cloud > Environment settings, select the subscription, and set AI services to On on the Defender plans page. Each component can then be set under the plan's settings. The plan works at the level of the subscription, so new deployments are included automatically.
Components
The plan has three components, each of which can be toggled.
| Component | What it does | Important limits |
|---|---|---|
| Suspicious prompt evidence | Shows the prompt that triggered an alert | When off, prompts are still analysed, but masked in alerts |
| Data security for AI interactions | Sends interaction data to Microsoft Purview | Needs a Purview licence, covers Microsoft Entra user-context calls only, and excludes Foundry agents |
| AI model security | Scans models in Azure Machine Learning registries | Concerns models rather than prompts |
Turning on user prompt evidence involves a trade-off. An analyst who can see the prompt can judge an alert much more quickly, but the prompt may contain sensitive data, so access to those alerts needs to be controlled. The setting is Enable user prompt evidence, under AI services settings.
The Purview configuration route for data security is being deprecated in favour of the compliance and security management page in Microsoft Foundry, so check the current guidance.
Plan components
How alerts reach analysts
Alerts appear in Defender for Cloud, and they integrate with Defender XDR, where they can join an incident that also involves identities and devices. A jailbreak attempt on a model becomes far more meaningful when it is correlated with a sign-in from an unusual location by the same user.
Investigation begins with the user or application, the deployment and the prompt evidence. If an application calls the model with a shared key, then alerts cannot identify an individual user, so passing user context in requests improves an investigation. Prefer Microsoft Entra authentication to keys for this reason as well.
Where the plan fits
Candidates should keep several AI-related features apart. The following comparison shows what each is for.
Guardrails, threat protection or posture?
Masked prompts
A security analyst receives a Defender for Cloud alert about a jailbreak attempt on an Azure OpenAI deployment, but the alert shows no prompt text. The team wishes to see prompts in future alerts, and also to send interaction data to Microsoft Purview. The company has Purview licences. What should you configure?
In the AI services settings, turn on Enable user prompt evidence, since prompts are analysed but masked when it is off. Turn on Data security for AI interactions as well, noting that it covers only calls with Microsoft Entra user context, and that it does not include Foundry agents.
Raising the guardrail level changes what is blocked, not what an alert displays. Enabling diagnostic logs on the resource would not change the alert. AI model security concerns models in registries, not prompts.
With user prompt evidence off, are prompts still analysed?
Show answer
Yes. They are analysed, but masked in alerts.
Exam Tips
Remember for the exam
- Defender for AI Services detects; guardrails block.
- Prompts are masked in alerts unless user prompt evidence is on.
- Only text is analysed, and connected AWS accounts are not covered.
- Data security for AI interactions needs a Purview licence.