AuthorizationFailed Exercise - Create an Azure virtual machine

Christopher Mills 20 Reputation points
2024-05-02T14:57:41.7333333+00:00

christopher [ ~ ]$ az vm create --resource-group "learn-44f24c66-03ca-429e-b7d7-40d7a4066486" --name my-vm --public-ip-sku Standard --image Ubuntu2204 --admin-username azureuser --generate-ssh-keys

(AuthorizationFailed) The client 'christopher.mills@cdwg.com' with object id '489ac4d2-cbd4-4a85-aa8f-ea2ae0819e4c' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/read' over scope '/subscriptions/66934742-a2f4-4f94-ad7b-07a47d83d2bc/resourcegroups/learn-44f24c66-03ca-429e-b7d7-40d7a4066486' or the scope is invalid. If access was recently granted, please refresh your credentials.

Code: AuthorizationFailed

Message: The client 'christopher.mills@cdwg.com' with object id '489ac4d2-cbd4-4a85-aa8f-ea2ae0819e4c' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/read' over scope '/subscriptions/66934742-a2f4-4f94-ad7b-07a47d83d2bc/resourcegroups/learn-44f24c66-03ca-429e-b7d7-40d7a4066486' or the scope is invalid. If access was recently granted, please refresh your credentials.

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

Accepted answer
  1. RNareddy 790 Reputation points Microsoft Vendor
    2024-05-02T17:12:59.96+00:00

    Hi Christopher Mills,

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

    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

    Please do not use a personalized resource group name, such as (e.g., my-group-01). Instead, consider using a resource group name that begins with learn-f063fbde-8087-4d3b-91a3-cc2475106779, as illustrated in the provided screenshot below. total rg3

    Please reach out to us if you have any further queries.

    Kindly "Accept answer" and "Upvote" so that it is useful for others in the Microsoft Q&A community.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful