Credential Problem

Gourab Saha 40 Reputation points
2024-02-20T03:09:43.1166667+00:00

Im getting error while performing this action
az vm create --resource-group "[sandbox resource group name]" --name my-vm --public-ip-sku Standard --image Ubuntu2204 --admin-username azureuser --generate-ssh-keys

error -(AuthorizationFailed) The client 'live.com#@gmail.com' with object id '358549b0-f7a1-469e-96a8-e944acfa3dc4' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/read' over scope '/subscriptions/92852ea3-397d-4bc4-826e-c421f660363f/resourcegroups/[sandbox resource group name]' or the scope is invalid. If access was recently granted, please refresh your credentials. Code: AuthorizationFailed Message: The client 'live.com#@gmail.com' with object id '358549b0-f7a1-469e-96a8-e944acfa3dc4' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/read' over scope '/subscriptions/92852ea3-397d-4bc4-826e-c421f660363f/resourcegroups/[sandbox resource group name]' or the scope is invalid. If access was recently granted, please refresh your credentials.

User's image

As you can see in the image its telling me to create a VM if I don't see any in the array. but when I run the above command its giving me error help to solve this error.

Azure Azure Training
0 comments No comments
{count} votes

Accepted answer
  1. TP 124.7K Reputation points Volunteer Moderator
    2024-02-20T03:16:45.7466667+00:00

    Hi Gourab,

    There is a bug in the exercise that appeared recently. Please use instructions below.

    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 something similar to learn-3294a2f5-b8ec-2def-ca62-49e23701bd77, immediately navigate back to Create an Azure virtual machine exercise and complete it. 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

    6 people found this answer helpful.

0 additional answers

Sort by: Most helpful

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.