How to Fix Missing X-CustomSpam Header in Microsoft 365 Emails
Question details
Users or administrators need to resolve an issue where email messages are missing the expected X-CustomSpam header after being processed by filtering rules.

- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Analyzing incoming email message headers to identify which Advanced Spam Filter rule was triggered.
- Observed behavior
- Messages identified by Advanced Spam Filter rules do not contain the X-CustomSpam header, making it impossible to identify the specific filter or rule despite detection technology being visible.
Ensure you are logged in with global administrator privileges in your Microsoft 365 tenant, as you will need full access to the admin center and tenant diagnostic logs.
Open a Service Request in the Microsoft 365 Admin Center
Because this issue involves backend anti-spam processing and message-header generation, a global administrator must escalate the issue to Microsoft Support for a backend investigation.
Diagnosing missing message headers requires access to backend tenant logs and deep anti-spam processing diagnostics that are not exposed to standard users or tenant admins.
Sign in to the Microsoft 365 admin center using an account with global administrator credentials.
Locate and click on the 'Help & support' or 'Support' icon, typically found in the bottom right corner of the screen or in the left-hand navigation pane.
Provide a detailed description of the missing X-CustomSpam header issue. Be prepared to upload sample message headers, tenant logs, and diagnostic information requested by the support agent.
If your organization purchased its Microsoft 365 subscription through a third-party reseller or partner, you must contact the reseller's support desk directly instead of Microsoft.

Looking for a Lightweight and Free Office Suite?
While Microsoft 365 handles enterprise email and backend spam filtering, you may also need a fast, reliable desktop application for your documents. WPS Office is a powerful, free alternative that offers seamless compatibility with Microsoft Word, Excel, and PowerPoint, making it perfect for both personal and professional use.
- 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install the Software: Run the downloaded executable file and follow the brief on-screen prompts to complete the installation.
- 3. Open Your Documents: Launch WPS Office and instantly open your existing Microsoft Office files with perfect formatting retention.

Frequently Asked Questions
What is the purpose of the X-CustomSpam header in Microsoft 365?
The X-CustomSpam header helps administrators identify exactly which Advanced Spam Filter (ASF) rule was triggered when processing incoming email messages, aiding in tuning security policies.
Can a standard user fix missing spam headers in Microsoft 365?
No, standard users do not have the necessary permissions. A Microsoft 365 global administrator must investigate the anti-spam policies and contact support for backend diagnostics.
Why might my message trace not show the specific spam filter rule?
If the detection technology is visible but the specific rule header is missing, it is typically due to a backend processing error or an internal routing misconfiguration in Exchange Online Protection that requires Microsoft Support to resolve.




