Using Microsoft Graph API to Query Intune/Endpoint Manager, Azure AD, and Microsoft 365 Data for Power BI Reporting
Question
Hi All,
Is anyone experienced in using Microsoft Graph API to query Intune/Entra/M366 and export the data to CSV files for use in dashboards and reporting in PowerBi?
I’ve made a start on it but am finding it hard work to get the right data out, I have not found many examples to follow online.
Posted By Paul Thomas in HTMD FB Group
Answers ( 3 )
Replied by Jason Santoro
Due to restrictions in my org, dlp will flag it. We have super strict rules in place. I can point you here: https://github.com//Proacti…/Invoke-CustomInventory.ps1, as this is where it all started for me. Getting the additional data ingested to log analytics was the beginning of it. In my Ivoke-CustomInventory I actually modified it to pull in some very specific registry values and some other data from the device.
Replied by Bart DM
Jason Santoro, is it possible to share it as a power BI file where users just have to add the ID of their workbook
Replied by Jason Wilhelm
I use graphs manage identity, and automation accounts and push the data daily to Powerbi. Search YouTube for automation Intune reports. good place to start. hope that helps.
Replied by Saul Prra
What do you need to grab?
Replied by Rob Taylor
This is solid advice. If using Power BI, import the OData feed from Intune.
Replied by Paul Thomas
Jason Santoro, likely, I need Entra data, too and M365.
Replied by Rakib Rahman
Jason Santoro: I know. We do have some support cases with MS regarding missing stuff that’s available in the MS graph.
Replied by Paul Thomas
Saul Prra, in simple terms, I’m trying to do some enrolment and compliance reporting to begin with.
The basic information is a list of Entra devices, ID, name, owner, join type, etc.
For the devices that are in Intune, name, ID, owner, compliance status etc
From M365, user, ID, license type etc
I will then use the unique identifiers in Powerbi to link the tables together and produce reports and dashboards.
I started by creating a spreadsheet with data manually exported from Entra/Intune/M365, but it took many hours to manipulate and produce the reports.
Ultimately I want to automate it so that data is exported and updated in PowerBI each night. Then I have relatively live data.
Over time I will add additional data sets and increase the reporting capabilities.
Replied by Jason Santoro
Rakib Rahman data warehouse does not provide you with everything you probably be looking for. I found it better to go to log analytics, create a base query, use the export function, and select the query. Once you export and download it, open it in Notepad. It tells you how to add it to Power BI, but in simple terms, you go to Power BI, get into the advanced editor, and copy-paste the query into the editor. From there, you can access live log analytics data and create amazing dashboards.
Replied by Rakib Rahman
Use Intune data warehouse. It’s the simplest solution if you’re going to use PowerBI. The only problem is that the graph has data.