Why am I getting an AuthorizationFailed message when I try to use resources in a sandbox environment?

Rob Elliott 20 Reputation points
2024-04-22T22:27:53.65+00:00

I am trying to run the exercise titled "Create an Azure virtual machine" in the sandbox environment but it continually gives me an AuthorizationFailed message as if I am trying to spin up a VM for real in my "real" account.

This question is related to the following Learning Module

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.
937 questions
0 comments No comments
{count} votes

Accepted answer
  1. TP 76,681 Reputation points
    2024-04-22T22:37:20.91+00:00

    Hi,

    There is a bug in the exercise whereby the code blocks have "[sandbox resource group name]" instead of the correct name similar to "learn-0ac1d87f-a26e-1028-ec61-3b28ce1d6393". It is essential that the commands you use have the correct resource group name since you only have permission to the learn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx group and cannot create a new resource group.

    Please use instructions below to workaround the issue.

    Please navigate to the Create an Azure virtual machine exercise, Solve puzzle as requested, Activate a new sandbox, sign in, review permissions, 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, solve puzzle, etc., and complete exercise. Please make sure you click the Copy button in upper right of each code block, right-click Paste into Cloud Shell window on right, then press Enter to execute command.

    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


1 additional answer

Sort by: Most helpful
  1. Rob Elliott 20 Reputation points
    2024-04-23T13:45:51.75+00:00

    I found the correct resource group ID from my Azure portal and substituted that in the copy/paste code blocks from the Exercises. Doing so allowed me to complete the Exercises.