Day3 from 100days of cloud engineer Azure

I’m not able to create azure VM using CLI.

az vm create
–resource-group myResourceGroup
–name myVM
–image Ubuntu2204
–size Standard_B2s
–admin-username azureuser
–generate-ssh-keys
–storage-sku Standard_LRS
–os-disk-size-gb 30

(AuthorizationFailed) The client ‘79fe67ad-e868-471f-9853-a20bbeb0e173’ with o bject id ‘c4ef744e-7ad1-49ca-81a0-0580b7b0f057’ does not have authorization to perform action ‘Microsoft Resources/subscriptions/ resourcegroups/read’ over s cope ‘/subscriptions/f0c3bcdd-5ce2-4fa0-8cf3-41559747512b/resourcegroups/myRes ourceGroup’ or the scope is invalid. If access was recently granted, please re fresh your credentials.

Code: AuthorizationFailed

Message: The client ‘79fe67ad-e868-471f-9853-a20bbeb0e173’ with object id ‘ce f744e-7ad1-49ca-81a0-0580b7b0f057’ does not have authorization to perform acti on ‘Microsoft. Resources/subscriptions/ resourcegroups/read’ over scope ‘/subscr iptions/f0c3bcdd-5ce2-4fa0-8cf3-41559747512b/ resourcegroups/myResourceGroup’ o r the scope is invalid. If access was recently granted, please refresh your cr edentials.

The problem is that you’re using a non-existant resource group; you need to use the resource group that’s already defined in the account. You can find out its value by doing “az group list”.