Pages

Friday, February 27, 2026

Microsoft Graph API in Azure AutomationAccount

In my last post, I created an AutomationAccount that had a PowerShell 5.1 runbook and running the Exchange Online module. This time around, I added Graph API.

Some notes...

  • Create a new runtime environment (RE) using PowerShell 7.4, I could not get Graph API modules to work with older versions.
  • Pre-load the new RE with the minimum Graph API modules such as: Microsoft.Graph.Authentication, Microsoft.Graph.Users, and Microsoft.Graph
  • With a system-assigned managed identity, easy to connect using: Connect-MgGraph -Identity -NoWelcome
  • No comments: