Forum Discussion

SeizeThaNight's avatar
SeizeThaNight
Brass Contributor
Jan 28, 2020

How can I get user's sent, received and read count for a specific date range?

In O365, in the "E-mail activity" reports at https://admin.microsoft.com/Adminportal/Home#/reportsUsage/EmailActivity, there's a dashboard that presents data for e-mail accounts. Some columns are Received count, sent count and read count.  

This is only limited to choosing "Last 7 days" or 30 days or 90 days.   

Is there a way to get this data for a specified date range? For example, 1/1/2020 through 1/28/2020? 

Closest solution I can think of is starting a Get-MessageTrace on the first day of the date range and saving it as a .csv for each day, or appending it and add a date column for the date the cmdlet was run. 

7 Replies

    • SeizeThaNight's avatar
      SeizeThaNight
      Brass Contributor

      VasilMichev 

      Oh hi! lol. Thanks so much. Yes that helps. Coming across this, it looks like that's exactly what I need:

      https://gsexdev.blogspot.com/2018/01/a-walk-though-using-graph-api-mailbox.html

       

      Thank you

      • SeizeThaNight's avatar
        SeizeThaNight
        Brass Contributor

        VasilMichev 

        Interestingly, after I figured out how to return data for a particular date, I show for my own e-mail that I didn't send or receive or read any e-mail on Jan 15th. 

        However when I look at my Outlook client, I see plenty of sent/received e-mail. 

        Do you know why that might be? Is that data only for a certain client maybe? Wondering if maybe I was using a different Outlook client on that day. 

        "https://graph.microsoft.com/v1.0/reports/getEmailActivityUserDetail(date=2020-01-15)

Resources