Blog · Deliverability

Should You Build a Copilot Agent for Phishing Detection? A Framework for IT Teams

Should you actually build a custom Copilot agent as a second layer in your phishing detection stack?

The honest answer depends on your team, your existing tools, and the specific gaps you are trying to close. Most IT teams running Microsoft 365 Defender are better off tuning what they have. Some will genuinely benefit from a custom layer. Here is how to tell the difference.

This post gives you a practical framework for that decision, a breakdown of what signals a second-opinion agent should actually consume, and an honest look at where authentication-layer monitoring fits in.

When a Second-Opinion Agent Actually Makes Sense

A phishing Copilot agent is not a replacement for Defender. It is a supplementary layer that looks at flagged messages with a different set of signals. The question is whether your environment has gaps that this layer can meaningfully close.

Use these criteria to evaluate your situation:

Build if all of the following are true:

  • You have security or IT staff who can maintain a Power Automate flow without it becoming abandoned infrastructure
  • Your organization has more than 500 mailboxes, or handles sensitive communications where a successful phish has high impact
  • Your team has specific gaps Defender is not catching: targeted spear-phishing, executive impersonation, or suspicious routing patterns Defender flags inconsistently
  • You have an existing gap in your email security visibility: you know something is slipping through but cannot explain what

Skip the build if:

  • Your Defender configuration is not yet well-tuned; address that first
  • Your team does not have anyone who can maintain the flow long-term
  • You are looking for a "set it and forget it" solution
  • The main gap you are trying to close is high-volume commodity phishing, which Defender handles reasonably well

What Your Agent Can Catch That Defender Cannot

Most phishing tools analyze message content: links, attachments, sender display name, language patterns. This works well for known malware and high-volume commodity attacks. It misses things that require looking at data across messages or at authentication metadata that single-message analysis cannot access.

The gap that matters most: authentication-layer visibility.

A message can pass SPF, DKIM, and DMARC checks and still be sent from a compromised legitimate account, or from a domain an attacker registered to look like yours. Standard content filters do not see authentication metadata. They do not know that your domain's DMARC policy is set to reject and that a particular sending IP has never authenticated correctly against your domain before.

Authentication results (SPF pass/fail, DKIM result, DMARC pass/fail, alignment status) are available in message headers and via the Microsoft Graph API. These are signals that improve an AI model's ability to judge whether an email is actually from the sender it claims to be from.

The Authentication Layer Gap (and Why DMARC Reports Help)

Authentication metadata is available per-message, but aggregate patterns matter too. The difference is like looking at a single tree versus the whole forest.

DMARC aggregate reports show you the pattern of authentication results across all mail sent using your domain over a reporting period. They reveal:

  • Which senders are failing DMARC alignment (legitimate third-party senders you may not know about, or spoofing attempts)
  • Sudden spikes in authentication failures for your domain, which can indicate spoofing attempts or third-party sender misconfiguration
  • Unexpected mail flows from marketing platforms, CRM systems, or internal relays you did not document
  • DMARC policy rejection rates from senders you did not authorize

These patterns are not visible in any single message header. They require a tool that can ingest and analyze aggregate reporting data.

For a custom Copilot agent, you can feed DMARC aggregate report data as context. When a message comes in from a domain that recently started failing DMARC alignment at scale, that context helps the model make a more informed judgment than it could from content alone.

This is where DMARCFlow fits naturally: as the authentication monitoring layer that surfaces these aggregate anomalies and feeds them into your second-opinion workflow. DMARCFlow's aggregate report parsing turns a raw XML report into structured, queryable data that can be passed to a language model as grounding context before it evaluates message content.

How to Reduce False Positives Without Over-Tuning

The biggest risk with any AI-powered phishing layer is false positives. Here is what causes them and how to reduce them:

Root cause of most false positives: sensitivity is too high. Setting a low confidence threshold for flagging messages creates noise. Tune threshold using historical data, not gut feeling.

Use historical baseline data for tuning. Before activating any detection logic, pull at least 90 days of historical messages. Use this to establish what normal looks like for your organization. Flagging patterns that are common in your environment is not useful.

Use retrieval-augmented generation (RAG) for organizational context. If your organization regularly sends password-reset notifications, external invoices, or vendor statements, the model needs to know that. Feed it examples of your legitimate mail patterns so it can distinguish normal from abnormal more accurately.

Start narrow, expand carefully. Do not try to catch everything on day one. Start with one specific use case: executive impersonation, or external forwarding rules. Prove the workflow works, measure false positive rates over 30 days, then expand scope.

Monitor and audit the flow. A Power Automate workflow that nobody reviews becomes a liability. Assign ownership and review flagged messages weekly until false positive rates are stable.

When to Skip the Build and Tune Defender Instead

Before committing to a custom agent, run this checklist:

  • Have you configured Defender's anti-phishing policies with your specific domains and tenant? The default policy is not optimized for your environment.
  • Have you set up Defender threat intelligence policies for impersonation protection? This covers executive and internal user impersonation out of the box.
  • Have you enabled and reviewed DMARC reports in your tenant? You may already have the authentication data you need without building anything new.
  • Is your team's actual gap in phishing detection specific and well-defined, or is it a general feeling that "phishing keeps getting through"?

If you answered no to questions 1 through 3, tune those first. A well-configured Defender handles the majority of threats that custom agents would catch, without the maintenance overhead.

A Minimum-Viable Agent Architecture for Phishing Second-Opinion

If the build decision comes out positive, here is what a minimum-viable setup looks like:

Data sources:

  • Microsoft Graph API: read messages from a dedicated security mailbox (messages Defender has already flagged)
  • Authentication metadata: pull DKIM, SPF, DMARC results for the sender domain via Graph or DNS lookups
  • Optional: DMARC aggregate reports from DMARCFlow, passed as structured context

Flow design (Power Automate):

  • New email arrives in security mailbox (Defender-flagged messages auto-forwarded)
  • Extract sender domain, authentication headers, and message metadata
  • Call language model with structured prompt: sender domain, authentication results, message subject and body
  • Model returns: verdict (safe / suspicious / malicious), confidence level, reasoning
  • If suspicious or malicious: create Power Automate approval task for security reviewer
  • Store verdict and context in a SharePoint list for audit and tuning

Prompt structure example: ''' Sender domain: example.com SPF: pass DKIM: fail DMARC: pass Alignment: relaxed Message subject: [subject] Message preview: [body excerpt]

Is this message likely a phishing attempt? Answer with: verdict, confidence (0-100), and one-sentence reasoning. '''

Keep the prompt short and structured. Do not paste the full email body unless the model is specifically asked to analyze content.

FAQ

What is the minimum data source a phishing second-opinion Copilot agent needs? At minimum: sender domain, SPF/DKIM/DMARC authentication results, message subject. Without authentication metadata, the model has no signal beyond content analysis, which is what Defender already does. Adding DMARC aggregate context significantly improves the signal quality.

Can Copilot catch phishing emails that Defender missed? Yes, in specific cases. Defender is strong on known malware signatures, known-bad domains, and high-confidence phishing patterns. A custom agent can catch targeted spear-phishing that uses novel lure content, or impersonation attacks that exploit organizational context Defender does not have. Do not expect it to catch things Defender misses routinely; the gap must be specific and well-defined.

How do DMARC reports help AI detect phishing? DMARC reports provide aggregate visibility into authentication patterns across all mail sent using your domain. An AI model with access to DMARC aggregate data can detect whether a suspicious email's sender domain has been showing unusual authentication failure patterns recently, which is a strong signal of spoofing or domain impersonation that content analysis cannot see.

What causes false positives in AI phishing detection? The most common cause is over-sensitive detection thresholds combined with insufficient organizational context. The model flags messages that are unusual relative to a generic baseline but are normal for your specific organization. Using RAG with organizational context (examples of your legitimate mail patterns) and tuning with historical data reduces false positives significantly.

How long does it take to build a basic Power Automate phishing agent? A minimum-viable flow taking messages from a security mailbox and calling a language model can be built in one to two days. Getting false positive rates to acceptable levels takes 2 to 4 weeks of tuning with real traffic. Ongoing maintenance requires a few hours per month. Budget accordingly before starting.

Bottom Line

A custom Copilot agent for phishing second-opinion is worth building only in specific conditions: when you have a defined and specific gap in your current stack, staff who can maintain it, and organizational mail patterns that Defender cannot easily learn.

For most teams, the better investment is tuning Defender's impersonation protection, reviewing DMARC aggregate reports, and documenting your legitimate mail flows before adding another layer.

If you decide to build: start with authentication metadata in your signal set, not just message content. The authentication layer is where most tools have blind spots, and where a well-scoped second-opinion agent can add the most value.