Start / Stop D365FO Azure VM from mobile

In my last blog, I wrote about to start and stop the VM from Azure runbook. This blog will focus on how to plug that in external applicaitons so that the task can be performed on the go from mobile phone.

I have used PowerApp for it. Although the same thing can be achieved by using LCS website directly on mobile or by azure app. These are the different ways to achieve the same result.

Unfortunately as of today (May 2019), there is no connector for Azure runbook in PowerApps. But there is one for the flow. So first I have created a flow which can be triggered by PowerApps. In my flow there is a simple condition, if the input parameter value is "Start" it will trigger the azure auomation runbook task for starting the VM; otherwise it will tirgger the task for stopping the VM. The parameter for VM name and resource group name is taken directly from PowerApps parameters.



Once this is done, I created a new power app (canvas) application. On the button I have used below code to call the flow from there with parameters

'PowerAppsbutton'.Run("Start",DataCardValue2, DataCardValue1)

Here 'PowerAppsbutton' is the name of the flow I have created, DataCardValue1 and DataCardValue2 are the name of the fields in my power app where I am taking user input for VM name and resource name.

Once this is done then clicking on the button in power app triggers a flow which in turn calls azure automation runbook and performs the task.

Comments

  1. If you're attempting to burn fat then you absolutely need to start using this brand new custom keto plan.

    To produce this service, certified nutritionists, personal trainers, and cooks united to develop keto meal plans that are efficient, convenient, cost-efficient, and enjoyable.

    Since their launch in early 2019, 1000's of clients have already remodeled their body and well-being with the benefits a great keto plan can give.

    Speaking of benefits; clicking this link, you'll discover 8 scientifically-tested ones provided by the keto plan.

    ReplyDelete

Post a Comment

Popular Posts