I have an automation account with run as account set up. I am trying to use it to run a VM scaling runbook i have imported from the gallery in the portal (source here: enter link description here).
I am getting the following error, and I can not find out much about what exactly it means:
Add-AzureRmAccount : Cannot validate argument on parameter 'TenantId'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At line:106 char:11 + -TenantId $runAsConnectionProfile.Tenant.Id ` + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Add-AzureRmAccount], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Azure.Commands.Profile.AddAzureRMAccountCommand
It looks like the RunAsConnection doesn't have a tenant ID, but when I open up the run as account in the portal the AzureRunAsConnection looks to have a tenant id.
Can someone explain why this error could be happening?