Link Azure Automation and OMS Workspace

I had issues linking a Log Analytics Workspace and Automation Account this week.  To begin with, there is no option to link an Automation Account from within an OMS Workspace and no way to link an OMS Workspace from within the Automation Account.  The only option is to go into the OMS Workspace and add a solution that requires an Automation Account such as Automation and Control.  The process is outlined here.

Updated 11/2018 – Added Log Analytics to the content as OMS is getting phased out.
Issue below still exists, although you do not need to go into the OMS portal to link.  It can be done simply by added the Automation and Control solution in Azure.  The Log Analytics Workspace and Automation Account do not need to be in the same Resource Group.  They do need to be in the East US and East US 2 Region to link however.

The bigger problem is that when I went to configure the workspace there was no Automation Account available when I tire to add a solution.  OMS Gave me the message:

“Linked accounts must be in the same Azure subscription, resource group, and location as your workspace.”

Not good news if you are trying to link existing workspaces and Automation Accounts in different Resource Groups.  That is fine for me as I’m setting up a new environment.  That lead to my next issue with the location.

Creating an OMS Workspace gave me these options:

Creating the Automation Account gave me these options:

Notice the problem? The only US option for OMS is East US, but that is not an option for the Automation Account Location.  How can I link accounts in the same Azure location if that’s not an option?  In the end, I used East US for the Log Analytics Workspace and East US 2 for the Automation account.  With both in the same Resource Group I was able to make it work.  I guess the Location isn’t important for linking the accounts.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.