smsagent.blog
  • docs.smsagent.blog
  • Custom Reporting in Microsoft Intune
    • Delivery Optimization Report
    • Windows Update for Business Custom Reporting
      • Power BI Report Walkthrough
      • Known issues / limitations
      • Change log
      • Deploy the solution
        • Create Azure Resources
        • Configure Azure Resources
        • Deploy the client-side script
        • Deploy the Azure automation runbooks
        • Configure the Power BI report
      • Adding additional language support
      • Table schema reference
    • Automating Data Exports from Microsoft Graph
      • Azure Automation account
        • Create / configure an Azure automation account
        • Grant API permissions
        • Create an Azure automation runbook
      • Azure Storage account
      • Automate Data Export to Azure Storage Account
      • Automate Data Export to Azure Monitor Logs
      • Creating / Troubleshooting Runbooks
      • Power BI
        • Connect Power BI to an Azure storage account data source
        • Connect Power BI to an Azure log analytics workspace as a data source
    • Managed Devices Report
      • Create / configure an Azure automation account
      • Grant API permissions
      • Create / configure an Azure storage account
      • Create an Azure automation runbook
      • Create a PowerBI report
      • MEM Managed Device Report template
      • Bonus! Unhealthy MEMCM Clients email report
    • Intune Assignments Report
      • Create / configure an Azure automation account
      • Grant API permissions
      • Create / configure an Azure storage account
      • Create an Azure automation runbook
      • Create a Power BI report
      • Change log
    • Patch My PC Report
      • A look at the Power BI reports
      • Change log
      • Video guides
      • Things to know
      • Create / configure an Azure automation account
      • Grant API permissions
      • Create / configure an Azure storage account
      • Create an Azure automation runbook
      • Create the Power BI report
      • Feedback
    • Windows 11 Hardware Readiness Report
    • Gathering Custom Inventory with Intune
      • Set up the Azure Resources
      • Create a Proactive remediations script package
      • Create a runbook
  • PowerShell Scripts Online Help
    • Get-AzSubscriptionActivityLog
  • Azure Solutions
    • Automated Azure Table Storage Backups
      • Change log
      • Deploy the solution
        • Create the Azure resources
        • Set the backup schedule
        • Add storage tables to the backup
        • Add role assignments to the storage account/s
        • Create a lifecycle management rule
      • Run a manual backup
      • Restore a backup
Powered by GitBook
On this page

Was this helpful?

  1. Custom Reporting in Microsoft Intune

Automating Data Exports from Microsoft Graph

In this guide we will look at some options for automating the export of data from Microsoft Graph into locations such as an Azure storage account or a Log analytics workspace.

PreviousTable schema referenceNextAzure Automation account

Last updated 3 years ago

Was this helpful?

If you or your organisation uses Power BI for data visualisation you probably find yourself frustrated with the lack of support for Microsoft Graph in Power BI, making it difficult to create custom reports from Intune data. It's not impossible to make use of the Web connector in Power BI to get data from Microsoft Graph but this isn't .

With a little creativity it's still possible to use Power BI with Microsoft Graph however. You need some kind of intermediary process that can export data from Microsoft Graph into a format and location that Power BI is happy to use as a data source.

If you use Microsoft Azure, you can make use of its automation services to export Graph data on a schedule using, for example, a Function app or Logic apps. My preferred method for this is to use an Azure automation account as its easy to use, inexpensive and secure. Automation accounts now support managed identities, meaning you can access Microsoft Graph and Azure resources without requiring credentials in code, or even using a Runas account.

A benefit of using PowerShell to export data from Microsoft Graph is that you can process or transform your data before sending it on to a storage location. For example, some Graph entities such as for device installation status can return multiple entries per device. You may wish to clean this data and keep only the latest entry for a device, ensuring you only have one entry per device and your deviceId column contains only unique values. In order to create one-to-one relationships between tables in Power BI it is essential to have only unique values in the columns used to create relationships. Or you may wish to export a single table built with data from multiple Graph entities, for example.

Your automation service could export data into an Azure storage account in CSV format which can be easily consumed by Power BI. Alternatively, you could make use of Azure Monitor logs. Your Intune data can be sent to custom logs in a Log Analytics workspace and your log queries can be used in Power BI. Both options support scheduled data refresh to keep your reports up-to-date.

Setting up this automation requires some familiarity with Azure administration as well as understanding how to query Microsoft Graph with PowerShell. In this guide, I'll walk through how to set up the Azure resources to create the framework for your custom reporting, as well as provide some example PowerShell runbooks that demonstrate how to export data from MS Graph and send it to Azure storage or a Log Analytics workspace.

supported or recommended by Microsoft