In the exercise "Create an Azure Virtual Machine" I created the VM as instructed, but when I use the
az vm create \
--resource-group learn-xxxxxxxxxxx \
--name my-vm \
--image UbuntuLTS \
--admin-username azureuser \
--generate-ssh-keys
command I get the error:
(AuthorizationFailed) The client 'xxxxxxxx' with object id 'xxxxxx' does not have authorization to perform action 'Microsoft.Compute/virtualMachines/read' over scope '/subscriptions/xxxxxxxxx/resourceGroups/learn-xxxxxxxxx-cb152d78be0e/providers/Microsoft.Compute/virtualMachines/my-vm' or the scope is invalid. If access was recently granted, please refresh your credentials.
Code: AuthorizationFailed
Any idea what I'm doing wrong?