Tasks (Preview) errors with tenant ID mismatch for server start/stop

Diane Smith 1 Reputation point
2022-06-28T14:22:44.37+00:00

Azure Twitter people said to post this here:

Server--Tasks (Preview)--New Task

Click "Start Virtual Machine" or "Poweroff virtual machine", fill out info as requested (even following steps from online for how to do it), task runs, then errors with an:
{
"error": {
"code": "InvalidAuthenticationTokenTenant",
"message": "The access token is from the wrong issuer 'https://sts.windows.net/{ID}/'.
It must match the tenant 'https://sts.windows.net/{ID}' associated with this subscription.
Please use the authority (URL) 'https://login.windows.net/{ID}' to get the token.
Note, if the subscription is transferred to another tenant there is no impact to the services, but information about new tenant could take time to propagate (up to an hour).
If you just transferred your subscription and see this error message, please try back later."
}
}

The code behind this script is auto-generated, and uses variables that retrieves the data from our plan.

What is the fix for this? We can't follow online tutorial, video, page on Microsoft, etc--because we did, even though it wasn't needed given it was a simple auto thing.

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