Trying to auto-start my VM

Veer Mayo 0 Reputation points
2025-03-31T03:58:07.7366667+00:00

I'm trying to setup an auto start for my Virtual Machine in Azure at 4:00PM Arizona time. However, it isn't working. What am I doing wrong? I'm not sure if the timezone is the issue or the interval is - I'm super new to Azure.User's image

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,686 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mounika Reddy Anumandla 3,995 Reputation points Microsoft External Staff
    2025-04-01T03:29:51.2366667+00:00

    Hi Veer Mayo,

    For the first error message:

    Provide a start date and time, which has a maximum of 49 years in the future and must follow the ISO 8601 date time specification in UTC date time format, but without a UTC offset: YYYY-MM-DDThh:mm:ss if you select a time zone -or- YYYY-MM-DDThh:mm:ssZ if you don't select a time zone So for example, if you want September 18, 2024 at 2:00 PM, then specify "2024-09-18T8:00:00" and select a time zone such as Pacific Standard Time. Or, specify "2024-09-18T8:00:00Z" without a time zone. Important: If you don't select a time zone, you must add the letter "Z" at the end without any spaces. This "Z" signifies a UTC time format with a UTC offset. If you select a time zone value, you don't need to add a "Z" to the end of your Start time value. If you do, Azure Logic Apps ignores the time zone value because the "Z" signifies a UTC time format.

    https://learn.microsoft.com/en-us/azure/connectors/connectors-native-recurrence?tabs=consumption
    Second error if your User Id is in a different Tenant than the VM you get an Authorization (401) error (InvalidAuthenticationTokenTenant).

    Change Connection:

    1. Enable Managed Identities for the Logic App
    2. Add a new role assignment in the VMs Access Control (IAM) section for the Logic App
    3. Update the Start virtual machine task in the Logic App to connect using the managed identity
      https://learn.microsoft.com/en-us/answers/questions/405123/azure-logic-app-azure-vm-connector-invalidauthenti

    Another way: Connect with Service Principal: this option will execute this Logic App using a specific Service Principal and strongly recommended.

    This document gives you a detailed explanation on how to create Stop/Start VMs on Azure using Logic Apps: https://github.com/fabioharams/stopstart-logicapps
    https://learn.microsoft.com/en-us/azure/azure-functions/start-stop-vms/deploy

    Hope this helps!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.