Unable to add Nginx extension set to VM in sandbox

Cornelison, William 6 Reputation points
2023-01-06T15:43:38.5+00:00

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?

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,244 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Cornelison, William 6 Reputation points
    2023-01-06T15:49:48.177+00:00

    For whatever reason the command worked without that error after I refreshed the sandbox shell. Go figure!

    1 person found this answer helpful.
    0 comments No comments