How can I add Managed Identity to a DevTest Labs VM?

171 views Asked by At

I want to develop and test MSI on my development Windows VM which I created with DevTest Labs.

Going into the VM directly on Identity (Preview) I can change the setting but the Save keeps being disabled.

1

There are 1 answers

0
Kai Walter On BEST ANSWER

I managed to achieve this with Azure CLI:

  1. log in to Azure CLI, select Account
  2. list VMs with az vm list
  3. choose the VM to assign MSI to
  4. run az vm identity assign --name {vm-name} -g {vms resource groupname}

checking in the portal, VM / Identity tab, the Identity has Status=On