Transcribed

PowerShell Microsoft Graph API: No Modules, No Dependencies, No Limits

Dec 9, 2025 · 22m 39s
PowerShell Microsoft Graph API: No Modules, No Dependencies, No Limits
Chapters

01 · The Future of PowerShell Scripting

0s

02 · The End of Modules

24s

03 · REST API: The Better Alternative

41s

04 · Token Acquisition Methods

3m 39s

05 · The Core REST Pattern

4m 48s

06 · Common Mistakes to Avoid

5m 34s

07 · Quick Wins with Graph

6m 23s

08 · Enterprise Demo 1: Intune Device Cleanup

7m 20s

09 · Enterprise Demo 2: Identity Onboarding

10m 22s

10 · Enterprise Demo 3: Compliance Drift Detection

13m 16s

Description

PowerShell scripts built on MSOnline, AzureAD or heavy Graph modules break on Linux runners, containers and CI/CD. This episode shows admins and automation engineers the module-free token, headers and REST...

show more
PowerShell scripts built on MSOnline, AzureAD or heavy Graph modules break on Linux runners, containers and CI/CD. This episode shows admins and automation engineers the module-free token, headers and REST pattern for Microsoft Graph, three auth flows and three enterprise demos for Intune cleanup, onboarding and compliance remediation.

In this episode
  • 00:00 – Why PowerShell modules are legacy
  • 03:32 – The core pattern: token, headers, REST
  • 07:41 – Demo 1: Intune device cleanup
  • 10:35 – Demo 2: Identity onboarding via Graph
  • 13:20 – Demo 3: Compliance drift remediation
  • 16:14 – Architecture and best practices
  • 20:50 – The token audience gotcha

Key takeaways
  • Calling Microsoft Graph directly with Invoke-RestMethod removes module load times, dependency conflicts and the lag between new Graph features and module releases.
  • Use device code for local testing, client credentials with a certificate for unattended automation, and managed identity wherever the workload runs in Azure.
  • Production Graph scripts need paging via nextLink, retry with backoff on throttling, a dry-run flag, logging of request IDs and a token audience that matches Graph.

Worth quoting

“Waiting for a module means waiting for a maintainer who isn't on your payroll. Meanwhile, your project deadline didn't move.” – Mirko Peters (02:26)

“Managed identity means no secrets at all. That's the point. Less to steal, less to rotate, less to screw up.” – Mirko Peters (01:07)

Explore more on M365.FM

Follow and rate M365.FM in your podcast app, and join the free M365 community at m365con.net.

Become a supporter of this podcast: https://www.spreaker.com/podcast/m365-fm-microsoft-365-azure-cloud-power-platform-ai--6704921/support.
show less
Information
Author Mirko Peters M365, Azure & AI
Organization m365 FM
Website www.m365.fm
Tags

Looks like you don't have any active episode

Browse Spreaker Catalogue to discover great new content

Current

Podcast Cover

Looks like you don't have any episodes in your queue

Browse Spreaker Catalogue to discover great new content

Next Up

Episode Cover Episode Cover

It's so quiet here...

Time to discover new episodes!

Discover
Your Library
Search