Extract All Email Addresses from Microsoft 365 Tenant

Welcome Forums General PowerShell Q&A Extract All Email Addresses from Microsoft 365 Tenant

Viewing 1 reply thread
  • Author
    Posts
    • #268946
      Participant
      Topics: 1
      Replies: 0
      Points: 13
      Rank: Member

      Hello,

      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.

      Thanks in advance!
      Jason

    • #269195
      Participant
      Topics: 1
      Replies: 55
      Points: 525
      Helping Hand
      Rank: Major Contributor

      Hello jsprague48,

      One of the options would be to use Get-MessageTrace (message data for the last 10 days) and Start-HistoricalSearch
      and Get-HistoricalSearch cmdlets ( data older than 10 days).

      Hope that helps.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.