In this guide we will create a Power BI report from a template to report on apps and updates in Intune managed by the Patch My PC publishing service. Patch My PC is a great tool for keeping 3rd party applications up-to-date. The report is only for applications in Intune and not ConfigMgr.
As Power BI does not natively support connections to Microsoft Graph, we will use Azure automation to regularly export data from Intune using the Microsoft Graph REST APIs and save this as CSV files in Azure blob storage. Power BI supports the use of files in an Azure storage account as a data source, and the Power BI service also supports scheduled refresh on this data source, so your report can automatically stay up to date.
Create / configure an Azure automation account
Grant API permissions to the managed identity or Run as account
Create / configure an Azure storage account
Create the Automation runbook
Create the Power BI report
A working Patch My PC for Intune installation with apps / updates created and assigned
Some familiarity with Azure administration
Some familiarity creating Power BI reports
Appropriate permissions to create / configure the Azure resources
Switched from using the deviceManagement/reports/getDeviceInstallStatusReport Graph endpoint to exportJobs for the device installation status data due to the limitation of the endpoint only returning 50 results per call.
Added a function in the runbook to create a unique result set for the device installation status data by including only the most recent entry per device
Released version 1.1 of the Power BI report template removing the 'Not applicable' status from the donut charts for a better view.
Fixed an issue with the automation runbook where it would fail if the number of apps or updates in an export job was a multiple of 20.
Updated the runbook script to include better error handling and some retry logic in case the http 504 error (gateway timeout) is returned.