0

When I try to list azure VMs on my account from their python API, I get the following error: Message: The client 'xxxxxxxxxxxxxxxxxxx' with object id 'xxxxxxxxxxxxxxxxx' does not have authorization to perform action 'Microsoft.Compute/virtualMachines/read' over scope '/subscriptions/xxxxxxxxxxxx/resourceGroups/xxxxxxxxx/providers/Microsoft.Compute/virtualMachines/xxxxxx'.

Does this type of API access require paid access or did I set up my authentication incorrectly?

baigz
  • 1

1 Answers1

0

You authentication is correct, but you just need proper permissions on the Azure side. So you need to grant yourself (the client you are acting from) a Virtual Machine Contributor or Contributor role to the resource group the VM is in (or to the subscription).

Take a look at this link.

4c74356b41
  • 69,186
  • 6
  • 100
  • 141