Reputation: 1
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?
Upvotes: 0
Views: 603
Reputation: 72191
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.
Upvotes: 0