We have a client that is looking to gather all sent to and received from email addresses (not internal user accts) across their Microsoft 365 tenant. The idea being that they want to create a mailing list from all external parties that they have had previous contact with.
I have found a way to extract all of the email addresses for an individual account using Excel as well as software. However, with both of these options, you have to login to each account individually which would make this very time consuming. I am wondering if anyone knows of a way to accomplish this using PowerShell and exporting the results to a .csv? I realize it’s a longshot, but I’m about out of ideas.