I have made the Run As account an owner for the Automation account but it still does not have authorization to call run the get-azureaduser commandlet.
Connect-azuread -TenantId 0650a7d8-f107-4bbf-b2df-7d9d6ab58a32 -ApplicationId 00ac0103-fd0d-4c3b-9e62-576729437767 -CertificateThumbprint 9CBA5AEC0ED6A87D9Dzzzzzzzzzzzzzzzz
$all_users= get-azureaduser -all 10000
How can I get a powershell script to use the AzureAD commandlets using the Run As account?
