Azure Automation: Runbook, RunAs Account: How to allow access to AAD (e.g. for Get-AzADUser)?
问题 Good afternoon I have selected stackoverflow for this question because probably mainly programmers are confronted with this question: This is the issue: If we call Get-AzADUser to get all AAD Users in the Azure Automation Runbook, then we get: Error 'Insufficient privileges' We do it like this: We have an Automation Account with an "Azure Run As Account" In the PowerShell Runbook we call: # Connect to AAD $Conn = Get-AutomationConnection -Name AzureRunAsConnection $account = Connect-AzAccount