This folder contains the three core flows that power the Microsoft Copilot SOC system. Each flow pulls live data from Microsoft services and routes it to the appropriate Copilot Studio agent for AI analysis.
| Flow | Schedule | Data Source | Target Agent |
|---|---|---|---|
| Flow A | Every 5 minutes | Entra ID Sign-in Logs (Graph API) | Identity Threat Agent |
| Flow B | Every 5 minutes | Defender for Office 365 Alerts | Phishing Investigation Agent |
| Flow C | Every 15 minutes | Entra ID Directory Audit Logs (Graph API) | Compliance and Audit Agent |
You will need the following values ready. All are obtained from your Azure App Registration and Copilot Studio agent.
| Placeholder | Where to find it |
|---|---|
YOUR_TENANT_ID |
Azure Portal > Entra ID > Overview |
YOUR_CLIENT_ID |
Azure Portal > App Registrations > your app > Overview |
YOUR_CLIENT_SECRET |
Azure Portal > App Registrations > your app > Certificates and Secrets |
YOUR_AGENT_ENDPOINT |
Copilot Studio > your agent > Settings > Channels > Direct Line |
YOUR_AGENT_API_KEY |
Copilot Studio > your agent > Settings > Channels > Direct Line > Secret Key |
The App Registration setup guide is in /docs/entra-app-registration.md
- Go to make.powerautomate.com and select your environment
- Click + Create then choose Scheduled cloud flow
- Once inside the flow editor, click the three dots (...) menu in the top right
- Select Code view (or Edit in advanced mode)
- Replace all existing content with the contents of
flow-definition.json - Click OK or Apply
- Find and replace all placeholder values (search for
YOUR_) with your actual credentials - Click Save
- Test with Test > Manually before enabling the schedule
Your Azure App Registration needs the following API permissions with admin consent granted:
| Permission | Type | Used by |
|---|---|---|
AuditLog.Read.All |
Application | Flow A, Flow C |
Directory.Read.All |
Application | Flow A, Flow C |
IdentityRiskyUser.Read.All |
Application | Flow A |
IdentityRiskEvents.Read.All |
Application | Flow A |
User.Read.All |
Application | Flow A |
SecurityEvents.Read.All |
Application | Flow B |
SecurityAlert.Read.All |
Application | Flow B |
SecurityIncident.Read.All |
Application | Flow B |
- Never commit real credentials to this repo. The placeholders (
YOUR_TENANT_IDetc.) must always be replaced locally after import. - The Bearer token expression for Authorization headers must use the expression editor in Power Automate:
concat('Bearer ', body('Parse_Access_Token')?['access_token']) - URI query strings with spaces must be URL-encoded as
%20to pass Power Automate's validator - JSON schemas in Parse JSON steps are best entered using "Use sample payload to generate schema" to avoid Monaco editor rendering issues