I've recently started using Azure Automation to execute runbooks. Due to my company's hybrid on-premise + cloud strategy, we have scenarios where we need to run the Runbooks on-premise. I recently started one Automation Account through the portal, set up the RunAs accounts (both modern and classic) and was able to connect to a particular machine on-premise, use it as a Hybrid Runbook Worker and execute runbooks using the RunAs account no problem.
However, I started a second Automation Account for a different project, and this time wrote it from scratch using ARM templates. I then later imported the Runbooks to be executed, again from a Hybrid Runbook Worker (running on a different worker machine), and didn't have a way to automate creation of the RunAs accounts, so again I created it through the portal. However, this time, I'm now receiving the message AzureAutomationAuthoringToolkit: Warning - Local value for Connection asset 'AzureRunAsConnection' not found.
when my Runbooks attempt to get the necessary connection parameters from the RunAs account to Login-AzureRmAccount
.
I've tried deleting and recreating the Runbooks after having created the RunAs accounts, I've tried deleting and recreating the Hybrid Runbook Worker groups (along with reinstalling the worker on the VM machines) and I've tried deleting and recreating the schedules (also to no success). I still get the error above. Has anybody run into this issue before ?