AuthorizationFailed - The client with object id doest not have authorization to perform action over scope, or the scope is invalid.

James Hambrick 0 Reputation points
2024-06-17T15:56:49.26+00:00

Hi folks,

I am working my way through the AZ-900 training. While attempting the Create an Azure VM exercise, I received the following error:

Code: AuthorizationFailed

Message: The client '<client>' with object id '<objectId>' does not have authorization to perform action '<action>' over scope '<scope>' or the scope is invalid.

The above error was returned after I tried running the provided command to launch a Linux VM:

az vm create --resource-group "learn-9d4ddb67-1d82-4485-ab1f-84f1a1da6a41" --name my-vm --public-ip-sku Standard --image Ubuntu2204 --admin-username azureuser --generate-ssh-keys

Any help is appreciated. Thank you.

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

1 answer

Sort by: Most helpful
  1. Rakesh Gurram 5,070 Reputation points Microsoft Vendor
    2024-06-17T16:26:00.66+00:00

    Hi James Hambrick,

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

    From your question we understand that you are trying to complete the exercise from Exercise - Create an Azure virtual machine.

    The error indicates that you're having trouble creating a virtual machine from the sandbox.

    To resolve this issue, please follow these troubleshooting steps:

    Step 1: Sign out from all tabs in your current browser and clear the cache. Then, try logging in again using your Learn ID credentials.

    Step 2: Log out of your current browser session and attempt to log in again using an incognito window or private browsing mode.

    Step 3: Switch to a different browser and try logging in again.

    Step 4: Attempt to log in with a new personal Microsoft email account in the learning path using a completely different browser. If you don't have one, create a new free Microsoft account. Note that you need to sign in with a Microsoft account, such as Office 365 or Outlook.com, for sandbox access.

    Step 5: If you are still unable to create a resource due to insufficient permissions in the sandbox subscription, we recommend signing up for an Azure free account through the link: Azure free account and creating a sandbox environment there.

    For instructions on how to conduct Microsoft Learn training exercises using your own subscription, please refer to the following link: Run Microsoft Learn training exercises in your own subscription.

    Please don't hesitate to reach out to us if you have any other queries.

    If you found the information helpful, we would greatly appreciate it if you could acknowledge it by selecting the Accept Answer & Upvote options.