Microsoft Defender for Cloud
Cloud and workloads

Gain application and end-user context for AI alerts

In brief

The article now describes adding end-user and application context to Azure AI API calls, clarifies misspelled UserSecurityContext fields, and adds supported API and SDK guidance. It also specifies that the parameters are unsupported with models deployed through the Azure AI model inference API.

What Defender admins need to know

Review the clarified compatibility and field-naming guidance when configuring alert enrichment. No required administrator action is stated.

Summaries are generated from the documentation change itself.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

Microsoft Defender for Cloud's threat protection for AI services lets you enhance the actionability and security value of generated AI alerts by providing both end-user and application context.

Most AI service scenarios are built as part of an application, so API calls to the AI service originate from a web application, compute instance, or AI gateway. This setupapplication-mediated architecture introduces complexity because investigators lack context when they review AI requests to determine the business application or end-user involved.

Together, Microsoft Defender for Cloud and Azure AI let you add parameters to Azure AI API calls so Defender for Cloud can capture critical end-user or application context in AI alerts. ThisCapturing end-user and application context in AI alerts leads to more effective triage and results. For example, when you add end-user IP or identity, you can block that user or correlate incidents and alerts by that user. When you add application context, you can prioritize or determine whether suspicious behavior is standard for that application in the organization.

:::image type="content" source="media/gain-end-user-context-ai/after-code.png" alt-text="Screenshot of the Defender XDR portal showing benefits from adding the code." lightbox="media/gain-end-user-context-ai/after-code.png":::

For application context, pass the applicationName field, as a simple string.

If a field’sthe name of any UserSecurityContext field is misspelled, the Azure OpenAI API call will still result in success.succeeds.

The user security context object is part of the request body of the chat completion API.

This featureAdding UserSecurityContext parameters for Defender for Cloud alert enrichment is currently not supported when applying models deployed through the Azure AI model inference API.

AvailabilitySupported APIs and SDK versions

The following table lists the supported APIs and SDK versions for UserSecurityContext.

Source Version support Code Example Comments