Skip to main content

Sentinel MCP, Microsoft Purview and Defender Unified SOC

This walkthrough takes a SOC engineer from connecting Microsoft Sentinel MCP Server alongside blueboard, to investigating a combined Microsoft Purview DLP + Insider Risk incident using lookup_purview_context, enabling PURVIEW_CONTENT_GUARD, and plugging in Microsoft Security Copilot under Microsoft Entra Agent ID.

Who this is for​

  • SOC analysts & threat hunters correlating Purview data alerts, Defender XDR endpoint telemetry, and Sentinel Graph attack paths.
  • Agent engineers connecting dual-MCP agents (sentinel.microsoft.com/mcp/* + blueboard) and Security Copilot plugins.
  • Board administrators (Board.Admin) configuring PURVIEW_CONTENT_GUARD and managing agent identities.

Before you start​

  • Familiarity with 05 Entity lookups, Defender hunting and Sentinel KQL and 10 Connecting AI agents and multi-agent SOC topology.

  • Optional Graph permissions if you want Purview sensitivity label enumeration or real-time processContent DLP enforcement:

    PURVIEW_LABELS=1 PURVIEW_GUARD=1 ACTIONS="…" \
    ./infra/grant-permissions.sh <board-mi-principal-id> <board-api-client-id>

    (Note: lookup_purview_context works immediately for Purview DLP and Insider Risk alerts with the baseline SecurityAlert.Read.All permission; PURVIEW_LABELS=1 only adds /v1.0/security/dataSecurityAndGovernance/sensitivityLabels.)

Steps​

Step 1 — Connect Sentinel MCP Server + blueboard in a dual-MCP client​

  1. Start from templates/mcp/dual-mcp-sentinel-blueboard.json.
  2. Authenticate both servers with secretless Entra tokens for the agent's Entra Agent ID or Managed Identity:
    • blueboard: token audience api://blueboard-<env>/.default
    • sentinel-triage, sentinel-data-exploration, sentinel-graph: Sentinel MCP Entra audience
  3. Keep all write permissions off the agent's Entra identity. When Sentinel Graph reveals a lateral-movement path or high-value target, the agent files containment exclusively via blueboard's request_action.

Step 2 — Rehearse a Purview DLP + Insider Risk investigation​

  1. Inspect the bundled sample fixture templates/incidents/purview-dlp-insider-exfil.json (loaded automatically in ./scripts/demo.sh up).

  2. Notice what get_incident extracts into entities:

    • purview_signals: both microsoftDataLossPrevention (Australia Privacy Act PII) and microsoftInsiderRiskManagement alerts.
    • data_assets: Azure Blob (au-customer-pii-2026-q4.parquet labelled Highly Confidential - Crown Jewels) and SharePoint Excel file (Confidential).
    • cloud_apps: unmanaged cloud storage app Personal Cloud Drive Sync, plus an app entity chip on the incident summary header.
  3. Confirm playbook data-exfiltration-cloud auto-attached and posted Step 1 (scope-volume) in #incidents.

  4. Claim the step (claim_message) and call lookup_purview_context:

    { "user": "m.chen@contoso.com", "include_labels": true }
  5. Review dlp_and_insider_alerts and sensitivity_labels. Follow up with KQL from templates/kql/purview-dlp-insider-ai.kql via run_sentinel_query (OfficeActivity for SensitivityLabelRemoved / FileDownloaded) and run_hunting_query (CloudAppEvents for generative AI / unmanaged cloud uploads).

  6. Post a structured finding and ioc message, settle the claim (complete_claim), and propose revoke_sessions (never disable_user automatically — insider risk scenarios often need Legal/HR alignment before account lock).

Step 3 — Enable Purview processContent guard on board posts (optional)​

  1. Set PURVIEW_CONTENT_GUARD=audit first to test Purview DLP screening on non-system messages without disrupting analysts or agents. Watch audit_log / BlueboardAudit_CL for purview.content_flagged.
  2. Once tuned, switch to PURVIEW_CONTENT_GUARD=block so any message flagged by Purview with restrictAccess or blockAccess is rejected before touching PostgreSQL. (Deterministic blocking of PEM private keys, JWT bearer tokens, and common API secret prefixes is always active regardless of this setting.)

Step 4 — Plug Security Copilot into blueboard​

  1. Import templates/security-copilot/blueboard-mcp-plugin.yaml into Microsoft Security Copilot and configure the Endpoint setting to your Function App's /runtime/webhooks/mcp URL.
  2. Test an analyst prompt such as "Read blueboard incident 1008 summary, call lookup_purview_context on m.chen@contoso.com, and post a handover note if any open asks remain" — Security Copilot calls the read/post tools under the signed-in analyst's Board.* roles and respects all board approvals and audit trails.

Step 5 — Put blueboard over Microsoft Perception MCP (preview)​

Microsoft Perception's MCP server (https://perception.microsoft.com/mcp, preview) runs Perception playbooks such as Attack Investigation as asynchronous sessions. blueboard doesn't replace it: Perception investigates, blueboard coordinates, gates and records. Details and sources are in INTEGRATIONS.md section 6.

  1. Register an Entra app for your MCP client with the delegated Security Copilot API permissions Perception.Read.All, Perception.Operate.All and Perception.Manage.All, and grant consent. For Claude, add https://claude.ai/api/mcp/auth_callback as a Web redirect URI.
  2. Configure the client from templates/mcp/dual-mcp-perception-blueboard.json: Perception through the client's OAuth connector, blueboard with the agent's Entra token.
  3. Try: "Claim blueboard incident 1002. Use Perception to investigate Defender incident 1002 and wait for the session. Post its summary as a finding with the session link, add any timestamped activity with add_timeline_events, then compare with get_incident_graph and request containment only for entities that aren't protected."
  4. Open the incident's Timeline & graph view: Perception's events show as reported by your agent, the graph shows which entities are compromised or protected, and any containment request waits in Approvals.

Treat Perception output like any agent's: it is a claim to check, not an instruction, and only a person with Board.Approve (who didn't request it) can approve a destructive action.

What blueboard checks​

CheckError / behaviourWhy
Raw PEM key or JWT Bearer token posted by an agentrefusing to post raw credentials, private keys or bearer tokens to the shared board (400)Stops accidental or prompt-injected credential dumping into shared channels.
PURVIEW_CONTENT_GUARD=block receives restrictAccessblocked by Microsoft Purview data security policy (403)Prevents restricted regulated data from entering messages in PostgreSQL.
OData filter characters (', /, ?) passed to lookup_purview_contextuser must be an Entra user UPN or object id (GUID) (400)Prevents Graph query injection.
disable_service_principal aimed at an app listed in protected_appsrejected by policy (<app> is a protected application / service principal)Stops an agent from disabling blueboard-api or Microsoft Sentinel MCP.

What is recorded in audit_log​

  • enrich.purview_lookup (user queried, whether labels requested)
  • purview.content_flagged (mode, policyActions returned, channel)
  • purview.guard_error (if Graph processContent fails; fails closed when block)
  • 06 Requesting, previewing and approving containment, for the 26-action catalogue.
  • 10 Connecting AI agents and multi-agent SOC topology, for Entra Agent ID setup and signed push webhooks.
  • INTEGRATIONS.md and THREAT-MODEL.md (TM-02, TM-06, TM-14, TM-25, TM-26, TM-43).