Hi @SPX ADMIN ,
I have tried to reproduce the issue but was successfully about to login using Add-AzureRMAccount. Error says that $Conn.TenantID is null or empty so I would recommend to try printing $Conn.TenantID and see if it prints TenantID or not.
workflow StartGC
{
$Conn = Get-AutomationConnection -Name AzureRunAsConnection
Write-Output $Conn.TenantID
Add-AzureRMAccount -ServicePrincipal -TenantId $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint
Write-Output "end"
}
I was able to see below output:
<<Continued in next comment>>