Find and Remove an Unauthorized Exchange Online Forwarding Rule
Question details
Find the source of an unfamiliar forwarding address in an Office 365 alert and remove any unauthorized forwarding.

- Product
- Microsoft Exchange Online
- Device & OS
- not provided
- Scenario
- An administrator is investigating a forwarding alert for a Microsoft 365 mailbox.
- Observed behavior
- The unfamiliar address or forwarding rule is not visible in Outlook or the Microsoft 365 admin portal.
Identify the affected mailbox and the unfamiliar address from the alert. Use an account with permission to manage Exchange Online mailbox rules and review security activity.
Inspect and Remove Suspicious Inbox Rules with PowerShell
Use Exchange Online PowerShell to inspect mailbox rules, including hidden rules, when the alert does not match the rules shown in Outlook.
Open PowerShell, install the module if needed with `Install-Module ExchangeOnlineManagement -Scope CurrentUser`, and run `Connect-ExchangeOnline` to sign in with an authorized administrator account.
Run `Get-InboxRule -Mailbox user@contoso.com -IncludeHidden | Format-List Name,Identity,Enabled,ForwardTo,RedirectTo,ForwardAsAttachmentTo,Description`, replacing the mailbox address with the affected user. Compare the results with the address in the alert.
After identifying the exact rule, run `Remove-InboxRule -Mailbox user@contoso.com -Identity "Suspicious Rule" -Confirm:$true`, replacing the mailbox and rule name. Review the confirmation prompt before proceeding.
Run the `Get-InboxRule` command again and confirm that the unauthorized rule is gone. If no rule matches, continue checking mailbox forwarding and audit activity.

Check Mailbox Forwarding and Security Activity
Use this investigation when no inbox rule matches the alert or to check for other signs of unauthorized access.
Use WPS Office as a Free Alternative for Office Documents
WPS Office is a free, lightweight alternative with a familiar interface for working with Office documents. Its Microsoft Office format compatibility makes it easier to move existing files, although it does not manage or repair Exchange Online forwarding rules.

Frequently Asked Questions
Why can't I see the forwarding rule in Outlook?
The rule may be hidden, or the alert may refer to a rule that was changed or deleted. Use `Get-InboxRule -Mailbox user@contoso.com -IncludeHidden` to inspect current rules, then review audit activity around the alert time.
What if none of the inbox rules forwards messages?
Check mailbox-level forwarding with `Get-Mailbox -Identity user@contoso.com | Format-List ForwardingAddress,ForwardingSmtpAddress,DeliverToMailboxAndForward`. Also review audit records, sign-in activity, and relevant organization-wide mail flow rules.
Can I remove every rule that looks unfamiliar?
Confirm that a rule is unauthorized before removing it. Inspect its forwarding or redirect actions and consult the mailbox owner where appropriate, then use `Remove-InboxRule` with the correct mailbox and rule identity.
What should I do if the account may be compromised?
Reset the password, revoke active sessions in the Microsoft Entra admin center, review multifactor authentication methods, and investigate sign-in and audit logs. Remove confirmed unauthorized forwarding and verify that it has not returned.




