Monitor changes to Intune using Azure Functions, GraphAPI & PowerShell

In my last post, I showed you how to move a very common task - authenticating into the GraphAPI, up into an Azure Function App. Now that our authentication function has been turned into a REST Endpoint, we can stop focusing on how we get authenticated and start doing some really interesting stuff inside the environment. Case in point, myself and a colleague @OnPremCloudGuy were wondering if we could create a solution to monitor the Intune configuration of a tenant for any changes that might get made without our approval.
10 minutes to read

How to force Intune configuration scripts to re-run

** EDIT **

Due to constant requests, I’ve updated this solution to use newer authentication methods that allow MFA as well as native support in PowerShell 7.

Please note - the code below is provided as reference material only - authentication is NOT the point of the article and there are countless ways to acquire the correct authentication token.

***

Hi All and welcome.

As I am about to reach the pointy end of a project to implement an Intune MDM solution for a client, I’ve taken a moment to take stock of the lessons learned, problems faced and for the most part; the cool things I’ve run into and decided now is the time to start writing about them! Hopefully you find my posts interesting and I hope to keep the page updated fairly regularly.

Anyway, lets move onto the fun stuff!

6 minutes to read