Here we will create a runbook in the automation account that will retrieve data from Microsoft Graph using the REST API and export the data to the Azure storage account.
The Az.Accounts and Az.Storage modules are required to execute this runbook. If you wish to use a System-generated Runtime environment, you should be fine as the Az modules are already included. If you use your own runtime environment, make sure the Az modules are included.
It is highly recommend to use the latest PowerShell Core runtime version to execute the runbook (7.2 at the time of writing)