Runtime Security Architecture
Copilot Studio
AI Agent
→
Proposed
Action
→
External
Security Service
→
Policy
Evaluation
→
Decision
Allow / Block
Test an agent action
Select a scenario below and click Run to see a simulated trace of how the security service would evaluate and control the agent action.
Safe data read
Agent queries SharePoint list (read-only connector, authenticated user)
Allowed
Approved data write
Agent updates a CRM record through a governed Dataverse connector
Allowed
Blocked external email
Agent attempts to send email to an external address via Outlook connector
Blocked
Blocked privilege escalation
Agent tries to modify security group membership through Graph API
Blocked
Discovered agents
Sample data
| Agent | Type | Environment | Auth | Risk | Flags |
|---|---|---|---|---|---|
| Customer Support Bot | Generative AI | Production | Entra ID SSO | Low | 3 connectors |
Agent ID bot_cs_001 Created 2026-09-15 Connectors SharePoint (read), Dataverse (read), Knowledge base Runtime hook Supported (generative orchestration) Last activity 2026-11-17 14:23 UTC Owner admin@contoso.onmicrosoft.com | |||||
| Sales Pipeline Agent | Autonomous | Production | Entra ID SSO | Medium | Data write5 connectors |
Agent ID bot_sp_002 Created 2026-10-02 Connectors Dataverse (read/write), Outlook (send), SharePoint (read), Power Automate, SQL Server Runtime hook Supported (generative orchestration, event trigger) Last activity 2026-11-18 09:41 UTC Owner sales.admin@contoso.onmicrosoft.com | |||||
| HR Onboarding Assistant | Classic | Production | No auth | High | No authPII access |
Agent ID bot_hr_003 Created 2026-06-20 Connectors SharePoint (read/write), HTTP Request (custom) Runtime hook Not supported (classic agent) Last activity 2026-08-14 11:02 UTC Owner hr.team@contoso.onmicrosoft.com | |||||
| IT Helpdesk Copilot | Generative AI | Development | Entra ID SSO | Medium | Maker creds |
Agent ID bot_it_004 Created 2026-10-28 Connectors ServiceNow (read/write), Graph API (user read), Teams Runtime hook Supported (generative orchestration) Last activity 2026-11-18 10:15 UTC Owner dev.admin@contoso.onmicrosoft.com | |||||
| Finance Report Generator | Generative AI | Production | Entra ID SSO | High | Over-privilegedData write |
Agent ID bot_fin_005 Created 2026-07-10 Connectors SQL Server (read/write), SharePoint (full control), Power BI, HTTP Request (custom) Runtime hook Supported (generative orchestration) Last activity 2026-11-17 16:50 UTC Owner finance.admin@contoso.onmicrosoft.com | |||||
| Legacy FAQ Bot | Classic | Production | Entra ID SSO | Medium | Dormant 90d+ |
Agent ID bot_faq_006 Created 2025-12-01 Connectors Knowledge base (read-only) Runtime hook Not supported (classic agent) Last activity 2026-08-01 08:30 UTC Owner it.admin@contoso.onmicrosoft.com | |||||
Coverage note: Microsoft's external threat detection hook (preview) is only called for agents that use generative orchestration, including autonomous agents built that way. It is skipped for classic agents (Microsoft documentation), so classic agents get posture-based detection (inventory scan + configuration audit) instead of real-time blocking.
Configuration risk checks
Sample findings
Public access agent (no authentication)From your spec
Critical
An agent published to production without requiring user authentication. Any visitor with the link can interact with the agent and access connected data sources.
Found in sample: HR Onboarding Assistant (bot_hr_003) - no authentication, PII-connected SharePoint site
Over-privileged AI userFrom your spec
Critical
An agent's service account or connection identity holds permissions beyond what the agent needs: Global Admin, write-all, full SharePoint control, or broad SQL access.
Found in sample: Finance Report Generator (bot_fin_005) - full SharePoint control + SQL read/write on production database
Autonomous data-write toolFrom your spec
High
An agent uses connectors that write, update or delete records in production systems (CRM, database, file storage) without a human approval step in the workflow.
Found in sample: Sales Pipeline Agent (bot_sp_002) - Dataverse write + Outlook send with no approval gate
Dormant agent (90+ days inactive)Additional coverage
Medium
An agent in production has not been used in 90 or more days but retains active connectors and permissions. Dormant agents are often unpatched and unmonitored.
Found in sample: Legacy FAQ Bot (bot_faq_006) - last activity 109 days ago, still published
Maker credentials in productionAdditional coverage
Medium
An agent's connector runs using the maker's personal credentials instead of a dedicated service account. If the maker leaves, the agent breaks. If the maker has admin rights, the agent inherits them.
Found in sample: IT Helpdesk Copilot (bot_it_004) - ServiceNow connector runs as the developer's personal account
Coverage by agent type: Agents on generative orchestration (including autonomous ones) get both posture scanning (inventory + config audit) and runtime interception (external security service). Classic agents get posture scanning only. The runtime hook must be enabled per environment by a Power Platform administrator.
Milestones
Milestone 1 - 1 week
$750
Agent lab + API integration + risk detection
- Build several agent types in Copilot Studio: classic topic-based, generative orchestration with tools, and autonomous with event triggers
- One-command rebuild script using Power Platform CLI and solution export/import, after a one-time tenant setup (admin consent, enabling the hook) that is documented step by step
- API integrations: agent inventory and configuration (Dataverse, Power Platform inventory), conversation transcripts (Dataverse), audit events (Microsoft Purview audit log)
- 3 risk detection checks matching your spec + 2 additional, with capability matrix by agent type
- Deliverable: working lab with data flowing and risks detected, full coverage documentation
Milestone 2 - 1 week
$750
External action control service + handoff
- External security service using Microsoft's custom-provider contract (POST /validate, POST /analyze-tool-execution)
- Entra app registration with federated credential, policy evaluation engine, blockAction decisions inside Microsoft's one-second limit, with error behavior set to Block the query so a timeout fails closed
- Coverage: agents on generative orchestration intercepted at runtime; classic agents covered by posture scanning
- Proof of a block at the destination (the write never lands), always paired with an allowed control test
- Complete handoff documentation: architecture, API reference, risk rule specs, deployment runbook
- Independent rebuild verification: a second engineer runs the rebuild from documentation alone
$1,500 total
Fixed price - 2 weeks - remote - start immediately
Your questions answered
Tell us about a Copilot Studio project you have worked on
Our Microsoft 365 work so far has been on the application side: a Purview eDiscovery evidence-check app that runs on synthetic data, and an AI admin layer built on Microsoft Graph and Power Automate. Our security team has built enterprise governance frameworks and authored 30+ CVE deep-dive security research pieces. For this post we worked through the Copilot Studio threat detection contract; this page is a clickable mockup of that work on sample data, with no live tenant connection.
Which part of the job are you strongest at?
The API integration layer and the external action control service. Our backend architect has 16+ years in .NET and cloud architecture, with token and role-based access systems that passed independent security audits. Our security consultant (CISA, CISM, CRISC, ISO 27001 Lead Auditor) designs the detection rules. Together, they cover both the engineering plumbing and the security logic your product needs.
Do you have access to an AI-enabled Microsoft environment?
We can author and test in a Copilot Studio trial right away. A trial cannot publish agents, so the live hook test needs a licensed or pay-as-you-go environment: your PoC tenant, or one we set up with the Microsoft costs billed separately. In your tenant we would need a licensed (non-guest) account, admin consent for the Entra app registration, Power Platform environment access, and the external threat detection setting turned on. We start the day access is confirmed.
Our team
Security and GRC
About 10 years
CISA, CISM, CRISC, ISO 27001 Lead Auditor, C|CISO, PMP, Security+, CySA+. Risk assessment, secure code review, compliance programmes.
Backend and Cloud Architecture
16+ years
.NET Core, AWS (Certified Solutions Architect, Developer, Data Engineer). Token and role-based access systems that passed external security audits.
DevOps
AWS Professional Certifications
Solutions Architect Professional, DevOps Engineer Professional. Cloud-native deployment, monitoring, CI/CD.
QA Automation
13 years
Playwright, Selenium, Cypress, JMeter, API testing. Verifies every detection rule and integration path.
Questions for you
1. Which Microsoft 365 tenant edition and Copilot Studio license is the PoC running on, or should we set up a licensed environment on our side?
2. Are sample agents already built, or do we build the full agent set from scratch? Any existing assets to preserve?
3. For the action control service: which specific agent action should the first test prevent (a data write, an email send, a connector call)?
4. Does "rebuildable with one command" mean a rebuild into a prepared environment, or must a fresh environment also be fully automated?
5. Should documentation include API reference specs for your product team, operational runbooks, or both?
This is a clickable mockup on sample data, built from Microsoft's public documentation for the Copilot Studio external threat detection contract. The trace on the first tab is simulated and nothing here calls a live service. The paid engagement builds the real thing: the allow/block service, the API integrations, your test tenant and a documented handoff your team can run on its own.