Can't delete Connected Devices of Virtual Network

Carl Montplaisir 0 Reputation points
2025-03-06T18:27:48.4666667+00:00

Hi,

I can't delete one of our Virtual Network because I can't delete the connected devices linked to it. When attempting to delete the connected devices, I get the following error:

Failed to delete virtual machine scaleSet instance

Failed to delete virtual machine scaleSet instance '87'. Error: The access token is from the wrong issuer 'https://sts.windows.net/<our-tenant-id>/'. It must match the tenant 'https://sts.windows.net/33e01921-4d64-4f8c-a055-5bdaffd5e33d/' associated with this subscription. Please use the authority (URL) 'https://login.windows.net/33e01921-4d64-4f8c-a055-5bdaffd5e33d' 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.

I found that the tenantId 33e01921-4d64-4f8c-a055-5bdaffd5e33d is managed by Azure and that this happens when resources becomes orphans.

How can I delete the Virtual Network if I don't have access to delete the connected devices?

Thanks in advance

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,653 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pradeep Kommaraju 390 Reputation points Microsoft Employee
    2025-03-06T19:01:48.3+00:00

    Hello Carl,

    Thanks for reaching out to Microsoft Q and A Forum ,

    If VMSS is Managed by Azure (Example: AKS, Service Fabric, or Virtual Machine Scale Set Orchestration Mode) you will not have access to perform any operation on the same . So you will have to scale it down from the actual resources from which its associated to :

    For AKS (Azure Kubernetes Service): You need to scale down the node pool instead of the VMSS directly:

    sh

    az aks nodepool scale --resource-group <resource-group-name> --cluster-name <aks-cluster-name> --name <nodepool-name> --node-count 0

    For Service Fabric: If the VMSS is part of an Azure Service Fabric Cluster, remove the node type:

    sh

    az sf cluster node-type delete --resource-group <resource-group-name> --cluster-name <sf-cluster-name> --node-type <node-type-name>

    For Other Azure-Managed VMSS: Check if the VMSS is tied to an Autoscale Policy:

    sh

    az monitor autoscale show --resource-group <resource-group-name> --name <autoscale-name>

    If autoscaling is enabled, disable it before scaling:

    sh

    az monitor autoscale delete --resource-group <resource-group-name> --name <autoscale-name>

    If you are still unable to find the VMSS , please create a support ticket for a deeper review of orphan services and to help provide next steps .

    Finally , Don't forget to accept the answer if this was helpful .

    Thanks,
    Pradeep


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.