Use Azure Automation with au2mator

Last modified: February 23, 2022
You are here:
Estimated reading time: 2 min

Setting Information

This article will describe how you can connect au2mator to Azure Automation, Configure your Azure Automation Service, and other details on using Azure Automation with au2mator.

With Release 4.1, we switched to a new Authentication Method, using Azure App Registration.

Configure Azure App Registration

  1. Login to Azure Portal and navigate to “App Registrations”

2. Click on the “New Registration” Button on the Top

3. Enter a Name and Clik “Register” on the bottom

4. On the next page, please take note of your “Application 8clinet) ID. We need this ID later.

5. Next, click on “Certificates & secrets.”

6. Click on “New client secret.”

7. Enter a Name, select expire Date, and click “Add”

8. On the next page, make sure you copy your Client Secret. Once navigating to a different page, you will not get the Client Secret again.

9. We have now configured the Azure app Registration, now follow the next Chapter to configure Permissions for the Azure App

Configure Permissions for your App Registration

  1. Login to Azure Portal and Navigate to your Automation Account, which you would like to access from au2mator Portal.

We will walk you through the Steps to grant as few Permissions as possible. If you configure your Azure App as a global “Automation Operator,” this is fine but not needed.

2. Navigate to your Resource Group where your Automation Account is in

3. Click on “Access control (IAM)

4. Click on the “Add” button to add a New User Assignment

5. Select “Contributor” as Role and select your Azure App from the User Picker

5. Click on the “Save” Button

Configure Azure Automation with au2mator

To enable the Azure Automation Engine in au2mator Self Service Portal, you need to connect au2mator to Azure Automation.

Since Version 4.1, we allow multiple Automation Accounts from different Subscriptions. Repeat the above steps related to your needs.

  1. Login as Admin to au2mator
  2. Navigate to Settings
  3. Click on Automation
  4. Scroll down to Azure Automation Account
  5. Click on the “New” button to create a new Azure Automation Connection

Enter the Details

The Tenant ID can be gathered from Azure Portal/Tenant Properties.

Write an Azure Automation Runbook to work with au2mator

Create your Azure Automation Runbook. The Runbook Types we support are

  • PowerShell
  • PowerShell Workflow
  • Graphical PowerShell Workflow

Prepare the Script, and this is an example. The Important Stuff is

  • Input Parameters
  • Your Script
    • That’s is your Magic, and absolutely up to you
  • Return
    • with the Return function, you can write values back to au2mator, which shown in the Service Details

The below Script is ready to use at PowerShell Gallery: https://www.powershellgallery.com/packages/au2mator-Template/.

Save the Runbook and Publish it.

See our free and “read to au2mate” PowerShell Scripts for Azure Automation on PowerShell Gallery.

Create a Service with Azure Automation

Now it is time for the exciting Part, Self Service, and delegate your Azure Automation Runbook with au2mator.

Make sure you have configured at least one Service Group before.

  • Login as Admin
  • Navigate to Services
  • Click on +New
  • Enter Name, Description and select a Service Group
  • Navigate to Automation
  • Select Azure Runbooks
  • Select your stored Azure Connection
  • Select your Runbook from the List as Request New Runbook
  • Navigate to Questions and configure your Questions as needed

Hybrid Worker

A special Note to use Hybrid Worker. When you choose Azure Automation as Automation Service, you can select the Name of a “Hybrid Worker Group,” so the Runbook will be triggered on this Hybrid Worker Group.

Troubleshoot

If you face any Problems connecting from au2mator to Azure Automation, please check the following

  • au2mator Logs Files
  • Open Azure Portal, navigate to your Service User and check the User Sing-ins for any Errors.
Was this article helpful?
Dislike 0

Title