locked
Runbook not running (Add-AzureRmAccount) RRS feed

  • Question

  • Hi everyone,
    i want to use a runbook from runbook galery in azure.
    i get everytime a issue with connecting to azure. In test pane i can determine the error starts at "Add-AzureRmAccount".
    The "AzureRunAsConnection" is also checked and recreated.
    Here is a snippet:

    #############

    $connectionName = "AzureRunAsConnection" 
        # Get the connection "AzureRunAsConnection " 
        $servicePrincipalConnection=Get-AutomationConnection -Name $connectionName          
     
        "Logging in to Azure..." 
        Add-AzureRmAccount 
            -ServicePrincipal ` 
            -TenantId $servicePrincipalConnection.TenantId ` 
            -ApplicationId $servicePrincipalConnection.ApplicationId ` 
            -CertificateThumbprint $servicePrincipalConnection.CertificateThumbprint  

    #############

    What is my error?

    Thank you

    Rafael Seeck

    Wednesday, August 19, 2020 9:13 PM