Automate Start Azure VM — Using Microsoft Teams, Office 365 Forms and Azure LogicApp

Samuel Chong
3 min readSep 18, 2020

Prerequisites:

  • Microsoft Teams
  • Office 365 licensing
  • Azure Subscription

Steps

  • In Microsoft Teams, click on ‘+’ to add a tab.
  • Click on the ‘Forms’.
  • Create a Form, enter a name and click ‘Save’
  • Click ‘Add new’ to include question
  • Select input type. Select ‘Text’
  • Enter ‘VM Name’ as question
  • Add another question for input for Resource Group Name
  • Click on the form that you have created above. It may resides under ‘Group forms’
  • Copy the FormId from url. We’ll use the Form ID later in logicapp.
  • Fill in relevant detail and create Logic App
  • Click on ‘Logic app designer’
  • Under Templates section, select ‘Blank Logic App’
  • Search for ‘Forms’ under ‘All’ tab. Select trigger ‘When a new response is submitted’
  • Log in when prompted
  • Enter custom value using the ‘Form ID’ from previous step and Save
  • Add New Step and select ‘Get response details’. Enter Form ID again. For Response Id, select ‘List of response notifications Response Id’ under Dynamic content.
  • Add ‘New Step’ and select ‘Start Virtual machine (preview)’
  • Sign in if you get a prompt to do so.
  • Fill in the fields. For Resource Group and Virtual Machine, select from the ‘Dynamic content’ attribute list.
  • Save the setting in logic app.

You are done!

  • Go to Microsoft teams channels, you’ll see a form ready to go

--

--