Unable to create a vm instance in the course of learning with Concierge subscription

Eunice Gillette Mapong Donfack 20 Reputation points
2024-01-10T18:55:14.24+00:00

For a given exercise on the learning unit: Exercise - Create an Azure virtual machine, I get the following error message when I issue the command

az vm create --resource-group MyResourceGroup --name my-vm --public-ip-sku Standard --image Ubuntu2204 --admin-username azureuser --generate-ssh-keys

Error

(AuthorizationFailed) The client '******@xxx.com' with object id '9d0d6520-a7db-4eec-bb10-fc872d1e4a64' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/read' over scope '/subscriptions/c9c4cc6e-2adb-4f59-bbd1-4f966e547bd0/resourcegroups/MyResourceGroup' or the scope is invalid. If access was recently granted, please refresh your credentials. Code: AuthorizationFailed
Message: The client '******@xxx.com' with object id '9d0d6520-a7db-4eec-bb10-fc872d1e4a64' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/read' over scope '/subscriptions/c9c4cc6e-2adb-4f59-bbd1-4f966e547bd0/resourcegroups/MyResourceGroup' or the scope is invalid. If access was recently granted, please refresh your credentials.

How can I resolve this and continue learning, please?

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.
2,066 questions
{count} votes

Accepted answer
  1. TP 103.2K Reputation points
    2024-01-10T21:03:59.51+00:00

    Hi,

    The script you are entering isn't correct. There is no resource group "MyResourceGroup" and you don't have permission to create it. You can use instructions below to workaround the bug that is currently part of this exercise.

    Please navigate to the Create an Azure virtual machine exercise, Activate a new sandbox, sign in, etc. Once sandbox is activated and black cloud shell window with "Welcome to Azure Cloud Shell" displayed, navigate to Exercise - Configure network access using the "Unit x of 14" dropdown above the exercise.

    qna az-900 create azure vm workaround After page loads and resource group name is updated to learn-, immediately navigate back to Create an Azure virtual machine exercise and complete it. For each step you need to click Copy in the upper right corner of the code block and then right-click and choose Paste in Cloud Shell window on right, then press enter.

    Inspiration for above workaround came from @pnaroju's #2 suggestion in this post.

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    3 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Eunice Gillette Mapong Donfack 20 Reputation points
    2024-01-10T21:05:45.2866667+00:00

    I found where I was wrong. In the exercise, there's this line in the instructions that demanded I give the resource-group name the one that already existed with my subscription, which I did not :
    User's image

    So, I replaced the [sandbox resource group name] with the resource-group name available in the subscription, and I was now able to create the VM.

    Thanks for your time guys!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.