Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Tacllem
New Member

Use Power BI to query all mailboxes.

Hello and good day to you all.

I am starting out with Power Bi and need a way to report on all mailboxes over my Office 365 exchange server.  The task is to produce reports for the sales department of how many emails sent and received and then how many different domains were sent to.
So far all I can get Power BI to connect to I s a single mailbox when I enter my address.
I am the domain system administrator and have full rights.

 

Thanks.

5 REPLIES 5
ChrisAtMAF
Frequent Visitor

A lot of Exchange Admin Center data including a list of mailboxes can be imported via the new REST API by just adding the following to Power Query / Power BI as an OData Feed:

https://outlook.office.com/adminApi/beta/[Azure Active Directory Tenant ID]/

(Where [Azure Active Directory Tenant ID] is in XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX format and found via https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-how-to-find-te...)

There is a 'Mailbox' table that worked for my purposes. NB this is marked as 'beta' so be warned about relying on this long-term.

Anonymous
Not applicable

Hi.

When importing the Mailbox table I see this error.

In the image below we can better see the errors in the lines

The tables are not populated with data from my Exchange, Can you help me?

 

erro1.png

 

 

 

 

 

 

 

 

erro2.png

 

Hi @Anonymous ,

I also found that a lot of the API returned Errors - but some data is available (scroll right).

It sounds like you might need email usage reports though. To get those, you might need the 'Creating a Power Query for report data in Excel' section of 

https://minkus.medium.com/easily-connecting-between-power-query-power-bi-and-microsoft-graph-72333eb95a35

combined with

https://docs.microsoft.com/en-us/graph/api/reportroot-getemailactivityuserdetail?view=graph-rest-1.0

and https://docs.microsoft.com/en-us/graph/api/reportroot-getemailactivitycounts?view=graph-rest-1.0

Hope this helps,

Chris

amitchandak
Super User
Super User

That's for the try but I need to list "ALL MAILBOXES"  not just mine.

Additionally (I know you did not design the system) but requiring excel as a middle step I kind of silly. I will stick with Crystal reports if that's the case.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.