Reporting

Reporting tracks which recipients report a simulation email as phishing. Recipients who report are marked as reported in the campaign and counted on its Reported card.

This page is about reports made by recipients. For the PDF report of a campaign and emailing it to a client, see Campaigns: Report and Settings: PDF Reports.

Ways to track reports

Reporting options
Option How it works Use it when
Reporting Inbox (recommended) Phishing Club reads the Microsoft 365 mailbox that reports are sent to and marks recipients as reported within minutes. Users report with the Outlook Report button in Microsoft 365.
Import Reported Import a CSV of who reported on the campaign page, for example the user reported export from Microsoft Defender. The mailbox can not be read, or reports are collected some other way.
Phishing report endpoint Each email carries a report link in a custom header, such as X-PhishingClub-Report: {{.ReportURL}}. Your own report button or mail add in calls the link to mark the recipient as reported. You have your own report button, mail add in or mail gateway integration.

The Reporting Inbox is the recommended way to track reports. It is automatic, uses the Report button users already have in Outlook, and needs no changes to your emails or a custom add in.

The options can be used together. A recipient who already reported is not marked again.

Import Reported

Where: campaign page > Reporting card > Reported emails > Import Reported

Select a .csv file with a header row and at least one data row. Phishing Club shows a preview of the first rows, and you pick the column that holds the reporter's email and the column that holds the report date. Each row whose email belongs to a recipient of the campaign is marked as reported at that date. The email is matched exactly, or ignoring case when only one recipient of the campaign has that address. Recipients who already reported are not marked again, so importing the same file twice is safe.

A program has its own Import Reported in the Reporting card of the program page. It uses the same dialog, and the date column is optional.

Rows that can not be imported are skipped and the other rows are still imported. When rows fail, the result lists how many and the first 5 with their line number and the reason, for example Line 3: Invalid date "13/02/2024" or Line 8: "[email protected]" is not a recipient of this campaign. A file that can not be read as CSV, such as one with an unclosed quote, is rejected as a whole. Columns must be separated by commas and the file can be at most 32 MB.

Supported date formats:

Format Example
ISO 8601 with Z or an offset, fractional seconds optional 2024-03-05T14:30:00Z, 2024-03-05T14:30:00.1234567Z, 2024-03-05T14:30:00+02:00
ISO 8601 without a time zone 2024-03-05T14:30:00
YYYY-MM-DD, time optional 2024-03-05 14:30:00, 2024-03-05 14:30, 2024-03-05
MM/DD/YYYY, month first, time optional 03/05/2024 14:30:00, 3/5/2024 9:05, 03/05/2024
DD-MM-YYYY, day first, time optional 05-03-2024 14:30:00, 5-3-2024 9:05, 05-03-2024
YYYY/MM/DD, time optional 2024/03/05 14:30:00, 2024/03/05 14:30, 2024/03/05

All examples above are 5 March 2024. A date without a time zone is read as UTC. In the MM/DD/YYYY and DD-MM-YYYY formats, leading zeros are optional. A date with slashes is always read month first, so 02/03/2024 is 3 February. Use dashes, 02-03-2024, for day first. Times use the 24 hour clock, AM and PM are not supported.

The row is hidden for anonymized campaigns and for campaigns that are not scheduled yet. Like other campaign actions it needs the view the campaign belongs to: a company campaign in that company's view, a shared campaign in Shared view.

Reporting Inbox

The reporting inbox reads the Microsoft 365 mailbox that users report phishing to. When a user clicks the Report button in Outlook, Microsoft sends the reported email to that mailbox. Phishing Club checks the mailbox every 2 minutes and marks each campaign recipient it can match as reported. It only reads mail that arrives after the inbox is turned on, or after it is changed to another mailbox.

Where: company settings (Companies, open the company) > Reporting > Reporting Inbox for a company, and Settings > Reporting Inbox in Shared view for shared campaigns

Click Configure, or Manage when an inbox exists, to open the inbox settings. The global reporting inbox only covers shared campaigns; the Settings tab is only shown in Shared view. Each company needs its own reporting inbox. A reporting inbox only marks recipients of campaigns in its own scope, so one company's mailbox can never mark recipients of another company.

Reporting inbox settings
Setting Description
Enabled Check the mailbox every 2 minutes. On by default for a new inbox, so filling in the form and clicking Save once turns it on.
Mailbox Address of the mailbox reported emails are sent to
Sign in method App (recommended) uses an Entra app limited to the one mailbox, see Microsoft 365 setup. OAuth provider uses an authorized OAuth provider, see OAuth provider sign in.
Tenant ID, Client ID, Client secret Values of the Entra app, for the App method. When updating, leave the secret empty to keep the stored one. The secret is never shown again after saving.
OAuth provider The authorized OAuth provider to sign in with, for the OAuth provider method

Delete removes the reporting inbox and its stored credentials. Reports already recorded in campaigns are kept.

Microsoft 365 setup

  1. Open User reported settings in Microsoft Defender and check which mailbox reports go to. By default Microsoft sends reported messages to the global admin's mailbox. We recommend not using it. If your organization already set up a dedicated reporting mailbox, use that one and leave the setting as it is, so your security team keeps getting reports. Defender sends reports to one mailbox.
  2. If the setting still points to the global admin's mailbox, create a shared mailbox, for example [email protected]. Then in User reported settings turn on the Outlook Report button and send reported messages to that mailbox instead.
  3. Open Advanced delivery in Microsoft Defender. Add the mailbox on the SecOps mailbox tab, and add your Phishing Club sending domains and IPs on the Phishing simulation tab. Without the SecOps mailbox setting, a reported simulation can be filtered or trigger a training assignment in another product.
  4. Create the app and limit it to the mailbox, see app setup below.
  5. Enter the mailbox, tenant ID, client ID and client secret in Phishing Club, click Test, then Save. Role assignments in Exchange can take up to 2 hours to apply, so a test may fail until then.

The app reads the mailbox with the Microsoft Graph Mail.Read permission, limited to the one mailbox with Exchange RBAC for Applications. Do not add Mail.Read under the app's API permissions in Entra. That permission covers every mailbox in the tenant and the test warns when the app has it.

App setup

Limiting the app to one mailbox can only be done in Exchange Online PowerShell, as Microsoft has no portal page for it.

  1. Register a single tenant app in Entra and add a client secret. Do not add any API permissions.
  2. Open Azure Cloud Shell in the browser, choose PowerShell and run Connect-ExchangeOnline. Sign in as an Exchange or global admin.
  3. Run Get-OrganizationConfig | Format-List IsDehydrated. If it shows True, run Enable-OrganizationCustomization once. New and small tenants need this before Exchange can limit the app to one mailbox.
  4. Copy two IDs. The app registration and the enterprise application each have their own Object ID, and only the enterprise application's works here.
    • App ID: the Application (client) ID on the app registration's overview page.
    • Object ID: on the app registration's overview page, click the link under Managed application in local directory. This opens the enterprise application. Copy the Object ID shown there. Do not use the Object ID shown on the app registration page.
  5. Fill in the two IDs and the mailbox, then run these commands:
    $AppId    = "<app id>"
    $ObjectId = "<object id of the enterprise application>"
    $Mailbox  = "[email protected]"
    
    New-ServicePrincipal -AppId $AppId -ObjectId $ObjectId -DisplayName "Phishing Club Reporting Inbox"
    New-ManagementScope -Name "Phishing Club Reporting Inbox mailbox" -RecipientRestrictionFilter "PrimarySmtpAddress -eq '$Mailbox'"
    New-ManagementRoleAssignment -App $ObjectId -Role "Application Mail.Read" -CustomResourceScope "Phishing Club Reporting Inbox mailbox"

Common setup errors

Common setup errors
Error Cause and fix
AADServicePrincipalNotFound from New-ServicePrincipal The Object ID is the app registration's. Use the enterprise application's Object ID.
"isn't currently allowed in your organization" from New-ManagementScope The tenant needs Enable-OrganizationCustomization once.
"You must be assigned a delegating role assignment" from New-ManagementRoleAssignment Exchange has not picked up your admin rights after Enable-OrganizationCustomization. This can take several hours, sometimes a day, even for a global admin. Wait, reconnect with Connect-ExchangeOnline and run it again.
"already used" or "already exists" That step succeeded in an earlier run. Skip it and run the remaining commands.

Client secret lifetime

A client secret lasts at most 24 months. Choose 24 months when you add it in Entra, unless a tenant policy only allows less, and note when it expires.

Before the secret expires, add a new secret to the app in Entra, under Certificates and secrets, and enter it in the reporting inbox settings. When a secret has expired, the reporting inbox shows the sign in error as its last error and the status Error, also on the Reporting card of campaigns. Remove the old secret from the app once the new one works.

OAuth provider sign in

Instead of an app, the reporting inbox can use an authorized OAuth provider. This needs no PowerShell. Authorize the provider as an account that can only open the report mailbox, with these scopes:

  • offline_access
  • https://graph.microsoft.com/Mail.Read when the account owns the mailbox, or https://graph.microsoft.com/Mail.Read.Shared when it reads a shared mailbox

The provider must sign in with Microsoft, its token URL on login.microsoftonline.com, as the token is sent to Microsoft Graph. Use a dedicated account, because the token can read every mailbox that account can open.

The app is the recommended method. Compared to it, OAuth provider sign in has these downsides:

  • It can stop without warning. The sign in ends when the account's password changes, an admin revokes its sessions, or a conditional access policy requires a new sign in. Reports are not tracked until someone authorizes the provider again.
  • It needs a user account. The account has a password and MFA that must be kept, and like any account it can be phished or locked out.
  • Access is not limited by Exchange. The token can open every mailbox the account has access to, so keeping access to the report mailbox only depends on how the account is set up.
  • It still needs an app registration with a client secret that expires, and the tenant may require an admin to approve the Mail.Read.Shared permission.

When the sign in stops working, the reporting inbox shows the error and the status Error, also on the Reporting card of campaigns.

Test

Test checks the values in the form against Microsoft 365 without saving them:

  • Sign in gets an access token.
  • Permissions lists the granted scopes, for OAuth provider sign in.
  • Read report mailbox checks that the mailbox can be read.
  • Access is limited picks another recipient in the same scope on the same email domain, from the recipients in Phishing Club, and checks that the app can not open that mailbox. Only the inbox folder is requested, never a message. The check is skipped when there is no such recipient.

The test also warns when the app has a tenant wide mail permission in Entra, because that permission is not limited to the report mailbox, and when another mailbox could be opened.

Status

The Reporting Inbox card, under Settings > Reporting Inbox or the company's Reporting tab, shows the status of the inbox:

Reporting inbox status
Status Meaning
Not configured No reporting inbox is set up for this scope.
Disabled The inbox is saved but turned off, the mailbox is not checked.
Active The mailbox is checked every 2 minutes.
Error The last check failed. The error is shown on the card and in the inbox settings.

The inbox settings also show when reading started (Reading reports since), Last checked, Last success, and how many emails were Processed and Matched. Check now runs a check right away.

When a check fails, the next one waits longer, doubling each time up to one hour. Saving new connection settings, or turning the inbox back on, checks again right away.

An open campaign covered by an enabled reporting inbox shows a Reporting inbox row on its Reporting card, with a status, the time of the last check, the last error if any, and a Settings link to the inbox. The link is not shown for a shared campaign viewed in a company view. Closed campaigns do not show the row.

Campaign status
Status Meaning
Active Last check less than 8 minutes ago, no error.
Delayed Last check 8 to 15 minutes ago.
Not checked yet No check has run since the inbox was turned on.
Error The last check failed. Reports are not being tracked.
Not checking No check for more than 15 minutes. Reports are not being tracked.

Troubleshooting

Common errors
Error Cause
AADSTS7000215: Invalid client secret The secret is wrong or has expired. Add a new secret to the app.
AADSTS90002: Tenant not found The tenant ID is wrong.
ErrorAccessDenied when reading the report mailbox The role assignment is missing or not applied yet. It can take up to 2 hours. Check it with Test-ServicePrincipalAuthorization.
Error or Not checking on a campaign, or no check for a long time Open the inbox settings and look at the last error. When there is no error but the last check is old, the Phishing Club server is not running its checks, check the server logs.
Reports arrive but nobody is marked The campaign belongs to another company than the reporting inbox, the campaign is closed, the recipient was disabled by SCIM, the report was made before the inbox was turned on, or the email was sent before the reporting inbox was added and has no matching link. Check that reports show up on the User reported tab in Microsoft Defender and arrive in the reporting mailbox.

How the mailbox is checked

Each check asks Microsoft for the emails that arrived since the newest email of the last check, starting 10 minutes earlier so an email that shows up late in the mailbox is not missed. Phishing Club keeps the mailbox ID of every email it has handled, so emails in those 10 minutes are skipped and never counted twice. The list only holds IDs, senders and arrival times. An email is only read further the first time it is seen.

A check handles up to 200 emails. When more are waiting, the next check starts right away and continues after the last email seen.

Mail that arrived before the inbox was turned on is never read. Reports made before that are not counted. Changing the mailbox, or turning the inbox off and on again, starts reading from that moment. New credentials for the same mailbox, such as a renewed client secret, keep the reading position, so reports that arrived while the old secret failed are still read. A report that is only read after its campaign closed is not counted.

The access is read only. Phishing Club never moves, deletes or marks emails in the mailbox.

How reports are matched

Each reported email is matched to a campaign recipient in this order. Emails sent by a program are matched the same way. A report on a send of an anonymous campaign or program is recorded but does not move the Processed and Matched counters.

  1. The Message-ID of the simulation email. Phishing Club stores it for every email sent through an SMTP configuration. It is kept when a user reports with the Outlook Report button.
  2. A recipient ID in a header, such as a custom SMTP header with {{.rID}}.
  3. A recipient ID in the links or the tracking pixel, also when Safe Links has rewritten the links. This covers emails that users forward to the mailbox.

Emails sent through an API sender, and emails sent before the reporting inbox was added, have no stored Message-ID and can only be matched on links. Only the Message-ID of the first email sent to a recipient is stored. When an email is sent to the same recipient again, a report of the new copy is matched on links. A campaign with lure codes in its links also matches on a lure code in a link on one of your phishing domains, looked up the same way as a click. Only generated codes of at least 10 characters are used. Shorter codes and codes set by hand can be guessed and are never used for matching, then the Message-ID or the tracking pixel, which always carries the recipient ID, is needed.

Phishing Club reads as little of the mailbox as it can. For a report from the Outlook Report button it first fetches only the Message-ID and sender of the reported email. A known Message-ID is a match. When the sender's domain is not used by any of your emails, the report is not from Phishing Club and nothing more is read. Only when the domain is yours but the Message-ID is unknown, for example for an API sender, are the headers and text of that email read to find the recipient ID in its links. Files attached to reported emails are never downloaded. A reported email attached as an .eml file can only be read by downloading that file. For a plain forward, the headers and text of the forward are read.

A recipient who already reported is not marked again, so reporting the same email twice, or reporting several messages in a thread, counts once. Reports for closed campaigns are ignored, and so are simulation emails delivered to the reporting mailbox itself, for example through an all staff group. The report time is the time the email arrived in the mailbox.

What is read and stored

The reporting mailbox also receives real phishing and emails users reported by mistake. Phishing Club lists every email that arrives after the inbox is turned on, but only reads as much as described in How reports are matched. Reports of emails not sent from your domains are not read past their sender. Files attached to reported emails are never downloaded.

Phishing Club only keeps the mailbox ID and arrival time of each handled email, so the same email is never counted twice. These are deleted about a day later. The content of reported emails is never stored, logged or displayed.

A reported event stores whether the reporting address is the recipient's own address, so a report of a forwarded email can be told apart. For anonymous campaigns nothing about the reporter is stored.