Copilot Studio Gallery
ContributorsShare a sample
← Back to gallery

Agents + workflows

Agent DLP & Security Guard

Sample governance agent that reviews Copilot Studio maker configurations and prompts for DLP alignment, sensitive data exposure, unapproved HTTP connectors, and prompt injection risks, with findings for human security review. Includes a placeholder workflow definition with no live policy enforcement.

SPby Sapan PatelVersion 1.0.0.03 downloadsGitHub Release ZIP downloads across tracked versions since 2026-11-15. Last counted 2026-11-16T17:47:50.584Z. Includes direct downloads, repeats, and automation; not installations. As of 2026-11-16T17:47:50.584Z.Updated 2026-11-13Rate & discuss

This community example is provided as-is and is not covered by Microsoft Support. The underlying Copilot Studio and Power Platform products retain their standard support. Importing can create or modify resources and use your connections and permissions. Support details

Download ZIP
What’s in the solution
  • 1 workflow
  • 1 agent
  • 1 MCP server
  • 1 tool
  • 3 skills

Workflow preview

Audit agent DLP and security compliance

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
Governancegovernancesecuritydlpdata-loss-preventionresponsible-aicomplianceaudit

Sample Disclaimer: This solution is a governance reference sample and architectural template provided for demonstration, educational, and community evaluation purposes. It is not a certified production security assurance tool. Evaluator findings and scorecards are generated via LLM-assisted analysis and pattern matching and may produce false positives or false negatives. Qualified security and compliance administrator review is required before publishing or clearing any agent for production use.

An enterprise Copilot Studio governance agent and workflow solution sample that demonstrates patterns for auditing maker-built agents, topic instructions, and prompt flows for Data Loss Prevention (DLP) compliance, sensitive data leakage (credentials, connection strings, PII), and prompt injection vulnerabilities.

Overview

As generative AI and Copilot Studio adoption expands across organizations, security and Center of Excellence (CoE) teams require automated safeguards to verify that custom agents adhere to corporate security policies.

The Agent DLP & Security Guard demonstrates a pattern for interactive pre-publication audits. It inspects agent definitions, evaluates connector configurations against tenant DLP policies, tests prompt boundaries against known adversarial jailbreak patterns, and generates an auditable compliance scorecard.

Download sample DLP rule catalog (CSV)

Key Capabilities

  • DLP Policy Review (agent-assisted): Reviews agent connection references and custom actions against organization Power Platform DLP policy groups (Business vs. Non-Business vs. Blocked).
  • Sensitive Data & Credential Scanning: Inspects static agent instructions, knowledge definitions, and prompt templates for exposed credentials, bearer tokens, connection strings, and unredacted PII.
  • Prompt Injection & Adversarial Boundary Testing: Evaluates agent system prompts against common jailbreak and indirect prompt injection signatures (instruction overriding, delimiter tampering, unauthorized system disclosure).
  • Auditable Governance Scorecards: Produces structured compliance summaries with remediation guidance for makers and approval records for CoE administrators.

Agent Skills & Tools

The solution includes dedicated inline skills and tool definitions:

  • dlp-policy-evaluator (Skill): Evaluates connector actions and data flows against organization DLP policies to identify blocked or cross-boundary transfers.
  • prompt-injection-scanner (Skill): Tests system prompts and user input handlers against prompt injection patterns and unauthorized system disclosure attempts.
  • compliance-scorecard-generator (Skill): Generates a clear, actionable audit report highlighting critical, high, and medium policy findings with remediation steps. Requires security administrator sign-off for High findings; maker self-exceptions are prohibited from overriding Critical or policy-blocking findings.
  • DataverseAuditLogMCP (Tool): Configured for persisting audit findings and clearance records in Dataverse (shared_commondataserviceforapps / InvokeMCP).
  • AdminPolicyChecker (Tool): Configured for querying tenant administration policies (shared_powerplatformforadmins / GetEnvironmentDlpPolicies).

How It Works

  1. Intake & Trigger: The maker or administrator initiates an interactive review by providing agent instructions and connector definitions.
  2. DLP & Connector Analysis: Evaluates connectors and data sources to verify all endpoints are permitted within the target environment’s DLP policy.
  3. Instruction & Prompt Security Scan: Inspects prompt text and fallback topics for sensitive pattern signatures (SSNs, credit card numbers, secret keys).
  4. Adversarial Resilience Check: Validates that system instructions enforce grounding and reject instruction-override attempts.
  5. Scorecard for Human Review: Generates a compliance summary with remediation steps and clearance prerequisites for a security administrator to review. The sample does not enforce or block publication.

Conceptual Workflow Canvas

The solution includes a visual workflow canvas titled Audit agent DLP and security compliance (agent-dlp-audit-workflow).

Note on Workflow Implementation (placeholder logic): solution/Workflows/workflow.json contains two parts:

  • Canvas graph (trigger.metadata.associatedData.graph): a conceptual visual preview of the audit and scorecard process.
  • Executable definition: a nonfunctional placeholder included only so the export is structurally complete. Its HTTP trigger captures the submission and a single Response action returns 501 NotImplemented with isPlaceholder: true and a null verdict. It does not extract connectors, evaluate DLP policies, write to Dataverse, or return APPROVED/REJECTED verdicts, and it does not provide a pre-publication blocking gate.

DLP review, content inspection, and scorecards in this sample are produced conversationally by the agent and its skills for human security review. To automate checks or block publication, replace the placeholder with your own admin-connector logic, Power Platform ALM pipelines, or Center of Excellence Starter Kit audit flows.

The canvas illustrates:

  • Intake: Conceptual entry point for agent governance review.
  • Policy Scan: Evaluating connectors against active DLP policy groups.
  • Content Inspection: Scanning instructions and topics for sensitive pattern leakage.
  • Risk Decision: Evaluating whether security thresholds are met.
  • Scorecard Dispatch: Formatting audit verdict and remediation recommendations.
  • Notification: Providing compliance reports back to the maker.

Prerequisites & Required Permissions

  • Environment: Power Platform environment with Microsoft Copilot Studio enabled.
  • Channels: Compatible with Microsoft Teams, Microsoft 365 Copilot, and Web Chat.
  • Required Connections & Administrative Permissions (if using tool actions):
    • Admin Policy Checker (AdminPolicyChecker): Binds to the Power Platform for Admins connector (shared_powerplatformforadmins / GetEnvironmentDlpPolicies) using authMode: Invoker. Invoking users must hold Power Platform Administrator or System Administrator privileges in the tenant/environment to query active DLP policy groups. Ordinary makers without admin roles cannot inspect environment DLP policies via this tool.
    • Dataverse Audit Log Tool (DataverseAuditLogMCP): Binds to Microsoft Dataverse (shared_commondataserviceforapps / InvokeMCP) using authMode: Invoker. Invoking users require write and create privileges on the target Dataverse audit entity.
  • Running in Self-Service Maker Mode: If admin connections or Dataverse are not configured, the agent can be used in self-service conversational review mode, where makers paste their agent instructions and connector lists into the chat session for heuristic review and receive the generated scorecard directly in the conversation without automated Dataverse persistence.

Supporting files

  • Sample DLP rule and pattern catalogCSV · 966 B

Agents and their components

The MCP servers, tools, and skills each agent uses, and which agents hand off to others. Hover a component for its description.

AgentMCP serversToolsSkills

Agent DLP & Security Guard

Agent · Teams · Microsoft365Copilot

  • Dataverse Audit Log MCP
  • Admin Policy Checker
  • compliance-scorecard-generator
  • dlp-policy-evaluator
  • prompt-injection-scanner

Workflows and their components

Triggers, steps, connector services, and agent calls in each workflow.

WorkflowTriggerConnectorsAgents

Audit agent DLP and security compliance

7 steps

This export doesn't include the trigger type or some connector identities.

When agent is submitted for publication

Not included in this export
  • Extract connectors and endpoints

    Agent call

  • Scan prompts for injection & PII leakage

    Agent call

Exploded solution manifest

The download rebuilds these submitted files at the ZIP root. Gallery metadata and the human-facing README are excluded.

Solution
agent_dlp_security_guard
Publisher
Security and Governance Solutions
Version
1.0.0.0
Files
17
component: 10bot: 2other: 2solution: 2workflow: 1
PathTypeSize
[Content_Types].xmlother936 B
Assets/botcomponent_connectionreferenceset.xmlother418 B
botcomponents/agent_dlp_security_guard.skill.compliance-scorecard-generator/botcomponent.xmlcomponent516 B
botcomponents/agent_dlp_security_guard.skill.compliance-scorecard-generator/datacomponent1,098 B
botcomponents/agent_dlp_security_guard.skill.dlp-policy-evaluator/botcomponent.xmlcomponent499 B
botcomponents/agent_dlp_security_guard.skill.dlp-policy-evaluator/datacomponent876 B
botcomponents/agent_dlp_security_guard.skill.prompt-injection-scanner/botcomponent.xmlcomponent511 B
botcomponents/agent_dlp_security_guard.skill.prompt-injection-scanner/datacomponent940 B
botcomponents/agent_dlp_security_guard.tool.AdminPolicyChecker/botcomponent.xmlcomponent477 B
botcomponents/agent_dlp_security_guard.tool.AdminPolicyChecker/datacomponent270 B
botcomponents/agent_dlp_security_guard.tool.DataverseAuditLogMCP/botcomponent.xmlcomponent475 B
botcomponents/agent_dlp_security_guard.tool.DataverseAuditLogMCP/datacomponent243 B
bots/agent_dlp_security_guard/bot.xmlbot93 B
bots/agent_dlp_security_guard/configuration.jsonbot1,564 B
customizations.xmlsolution223 B
solution.xmlsolution511 B
Workflows/workflow.jsonworkflow5,667 B

Rate & discuss

Found this solution useful? Give it a thumbs up, ask a question, or share what you built.

GitHub Discussions ↗

Sign in with GitHub to join the conversation. Your comments and reactions are public.

Loading discussion...

This community example is provided as-is and is not covered by Microsoft Support. The underlying Copilot Studio and Power Platform products retain their standard support. Importing can create or modify resources and use your connections and permissions. Support details

Download ZIP

Explore community-built apps, agents, and workflows before you install.

Third-party noticesView on GitHub