This article explains how to configure Advanced Threat Protection (ATP) rules in Microsoft to avoid false positives in simulations sent via Direct Message Injection (DMI). This is a necessary step when DMI is already configured but clicks or file openings are recorded that users did not perform.
Prerequisites
- The DMI sending method must be configured and working. If you have not configured it yet, first follow the Microsoft - How to configure simulation delivery via DMI (Direct Message Injection).
- Administrator access to the Exchange Admin Center: https://admin.exchange.microsoft.com
- Administrator access to your SMARTFENSE platform.
Step 1 — Shorten the SMARTFENSE header
Microsoft has a limit of approximately 100 characters for the header value in mail flow rules. The default SMARTFENSE header usually exceeds this limit, so it must be shortened before creating the rules.
- Log in to your SMARTFENSE platform.
- Go to Settings > Security > Whitelist.
- In the Phishing and Ransomware Email Header section, click Customize Header.
- Copy the header value into a text editor (for example, Notepad).
- Delete characters from the end until the text is approximately 100 characters long.
- Paste the modified header into the corresponding field in the platform.
- Click Save.
Keep the manually shortened header: you will need it to configure both rules in the following steps.
Step 2 — Create the rule to skip ATP Link
This rule prevents ATP from scanning the links included in simulations, eliminating false clicks.
- Log in to the Exchange Admin Center: https://admin.exchange.microsoft.com
- Go to Mail Flow > Rules.
- Click (+) Add a rule > Create a new rule.
- Name it Skip ATP Links.
- Under Apply this rule if..., select Message header > includes any of these words.
- In Enter text, enter:
X-PHISHINGSIMULATION. Click Save. - In Enter words, paste the header you shortened in Step 1. Click Add and then Save.
- Under Do the following, select Modify the message properties > set a message header.
- In Enter text, enter:
X-MS-Exchange-Organization-SkipSafeLinksProcessing. Click Save. - In value, enter:
1. Click Save. - Click Next.
- In Set rule settings, leave the default values and click Next.
- In Review and finish, click Finish.
Step 3 — Create the rule to skip ATP Attachment
This rule prevents ATP from scanning attachments in ransomware simulations, eliminating false file openings.
- On the Rules screen, click (+) Add a rule > Create a new rule.
- Name it Skip ATP Attachments.
- Repeat steps 5 through 10 from Step 2, with the following difference in step 9:
- In Enter text, enter:
X-MS-Exchange-Organization-SkipSafeAttachmentProcessing
- In Enter text, enter:
- Click Next.
- In Set rule settings, leave the default values and click Next.
- In Review and finish, click Finish.
Step 4 — Enable the rules and set priority
Once the two rules are created, you need to enable them and set their priority correctly. Without this step, the rules will have no effect.
- Edit the rule Skip ATP Links.
- Go to Edit rule settings.
- Enable the Enabled field.
- Set the priority to 0.
- Save the changes.
- Edit the rule Skip ATP Attachments.
- Go to Edit rule settings.
- Enable the Enabled field.
- Set the priority to 1.
- Enable the option Stop processing more rules.
- Save the changes.
The option "Stop processing more rules" should only be enabled on the Skip ATP Attachments rule (priority 1).
Step 5 — Verify the configuration
Before launching a campaign to all users, validate that the rules work correctly.
- Wait at least 2 hours for the rules to propagate to all users.
- Set up a test simulation campaign aimed at a small group of users (it can be your own user).
- Verify that no clicks or file openings are recorded that were not performed by the users in the test group.
💡 Best Practices
- Configure ATP rules whenever DMI is used as the sending method in Microsoft environments, even if no false positives have been detected yet.
- Use the customized (shortened) header consistently: the same value must be in the SMARTFENSE platform and in both Exchange rules.
- Test the configuration with a small group before launching large campaigns.
- Do not exceed 100 characters in the header value to avoid Microsoft silently rejecting the rule.
- Review the rules in Exchange if false positives reappear at any point, as Microsoft environment updates may disable them.