Obtaining an Access Token for Microsoft Graph from an Azure Automation Account Runbook using a system-assigned managed identity using PowerShell and the Invoke-RestMethod cmdlet.

PowerShell Code