AuthorizationFailed Error on "Exercise - Create an Azure virtual machine"

Vasili Ulasau 20 Reputation points
2024-01-24T10:33:10.53+00:00

Getting such an error while creating azure vm: az vm create --resource-group my-vm-group --name my-vm --public-ip-sku Standard --image Ubuntu2204 --admin-username azureuser --generate-ssh-keys (AuthorizationFailed) The client 'live.com#email' with object id '8bbaff38-4444-486e-b48e-b339ced2656b' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/read' over scope '/subscriptions/f26515d9-3bc6-4a50-8192-cb816a833f54/resourcegroups/my-vm-group' or the scope is invalid. If access was recently granted, please refresh your credentials. Code: AuthorizationFailed Message: The client 'live.com#email' with object id '8bbaff38-4444-486e-b48e-b339ced2656b' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/read' over scope '/subscriptions/f26515d9-3bc6-4a50-8192-cb816a833f54/resourcegroups/my-vm-group' or the scope is invalid. If access was recently granted, please refresh your credentials. error

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

Accepted answer
  1. AmaranS 7,240 Reputation points Microsoft Vendor
    2024-01-24T10:44:27.2166667+00:00

    Hi Vasili Ulasau,

    Thank you for reaching out to Microsoft Q & A forum.

    Where am I seeing this?

    Subject: AZ-900/Azure Fundamentals

    Learning Path: Describe Azure architecture and services.

    Module: Describe Azure compute and networking services

    Unit: 3 - Exercise - Create an Azure virtual machine

    Based on the provided error code, it is recommended to substitute "[sandbox resource group name]" with the default resource group name, commencing with "learn......" (for instance: learn-f063fbde-8087-4d3b-91a3-cc2475106779). This replacement should be made adjacent to the --resource-group name, as illustrated in the accompanying.
    screenshot below. RG11

    Note: Kindly refrain from utilizing a personalized resource group name, such as (e.g., my-group-01). Instead, consider employing a resource group name that begins with learn-f063fbde-8087-4d3b-91a3-cc2475106779, as illustrated in the provided screenshot below.
    total rg3

    If you encounter any future issues, please feel free to contact us, and we will be pleased to assist you further.

    If you have found the answer provided to be helpful, please click on the "Accept answer" button so that it is useful for other members in the Microsoft Q&A community.

    Thank you.

    3 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.