How to configure Azure Automation Visual Studio Code Extension

In this post, we will configure the Azure Automation Visual Studio Code extension. For a long time I used to use Azure Automation PowerShell ISE extension, and last week I decided to test out the Azure Automation Visual Studio Code extension.

So before you can configure the Visual Studio Code extension, we need to set up the Azure AD Application.

Azure AD Application configuration

  1. Open Azure Portal –
  2. Select Azure Active Directory and choose App Registrations.
  3. Select + New Application Registration.
  4. Fill out the details:
    1. Name: Azure Automation Runbook Manager
    2. Application Type: Web app / API
    3. Sign-on URL:
  5. Click Create.
  6. Copy Application ID to NotePad.
  7. Click Settings and choose Keys.
  8. Fill out the Key description, duration and click Save.
  9. Copy key value to NotePad.
  10. Close the Azure AD Application configuration panels and go back to the main Azure AD configuration panel.
  11. Select Properties and copy the Directory ID to NotePad.

Visual Studio Code configuration

  1. Select Manage and choose Settings

  2. Expand Extensions and choose Azure Automation

  3. Fill out the following information:
    1. Automation Account: Azure Automation Account name
    2. Client ID: Azure AD Application ID
    3. Client Secret: Azure AD Application Keys value
    4. Resource Group: Azure Automation Resource Group Name
    5. Subscription ID: Your Azure subscription where you have the Azure Automation Account.
    6. Tenant ID: Azure AD Tenant ID
  4. Close the Settings
  5. Select the Automation Explorer

  6. Click + and fill out the Runbook name.

Azure Automation Account configuration

    1. On your Azure Automation Account assign the Contributer permissions for the Azure Automation Runbook Manager Azure AD Application.


If everything went correctly, then you should be able to create Azure Automation Runbooks directly from Visual Studio Code.

Have fun!