Impossible to connect scheduled Power On/Off tasks to VM.

Luciano 0 Reputation points
2024-08-12T16:32:28.28+00:00
When adding the task from the resource menu (vm) under tasks, I select the shutdown template. I add and control the assignment roles. The task is an entity managed by the system. When executing the task, the status appears: Failed. Unauthorized error.

The body's response: {
  "mistake": {
    "code": "InvalidAuthenticationTokenTenant",
    "message": "The access token is from the issuer \"https://sts.windows.net/f8cdef31-a31e-4b4a-93e4-5f571e91255a/\", which is incorrect. It must match the tenant \"https: //sts.windows.net/7f445afc-8726-4059-9fab-2b75f4b6981f/\" associated with this subscription. Use the authority (URL) \"https://login.windows.net/7f445afc-8726-4059-9fab -2b75f4b6981f\" to obtain the token. Please note that if the subscription is transferred to another tenant, this does not affect the services, but it may take some time for information about the new tenant to propagate (up to an hour). If "You just transferred your subscription and see this error message, please try again later."
  }
}

Do not transfer or use another subscription on the only one I have.
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,791 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,087 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,241 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mahesh Goud Juvvadi 975 Reputation points Microsoft Vendor
    2024-08-19T14:06:37.0733333+00:00

    Hi Luciano,

    Welcome to Microsoft Q&A Platform.

    Based the error we understand that the InvalidAuthenticationTokenTenant error typically occurs when the access token is issued by a tenant that doesn’t match the one associated with your Azure subscription and it must match one of the tenants associated with this subscription.

    To resolve this issue, you can try the following steps:

    Make sure that the tenant ID and subscription ID are correct in your profile showing on top right corner of Azure Portal Page - which should show the associated tenant details.

    Could you please check from your end and lets us know in the comments with screenshot.

    Thank you.

    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.