Use this script to gather allow and block lists for users, domains, and objects specified in content (spam) filters, connection filters, and transport rules.

As part of your security and operational best practices, review these settings periodically to ensure you are maintaining accurate and up-do-date settings.

The ouput of this script is a CSV containing the following columns:

To view screenshots and and more information about this script, check out the blog post at https://www.undocumented-features.com/2018/12/10/find-whitelisted-users-domains-and-ips-in-office-365/.