Search code examples
powershellazureazure-powershellazure-automationazure-runbook

AzureRunAsConnection not found


I have a AutomationAccount with AzureRunAsConnection created there. I can see it in the portal as well as get it in powershell using Get-AzureRmAutomationConnection and i can see the results.enter image description here

But when i connect from a Runbook ,it throws exceptionenter image description here Kindly help. Thanks


Solution

  • I found the solution here Azure Automation Docs . I used the Login-AzureRmAccount and Add-AzureRmAccount . Now i found that we should manually update the modules after creating an Automation account and then use Connect-AzureRmAccount with the credentials. That worked