How to fix authorization failed error when trying to create a VM through CLI

Chirag 0 Reputation points

The Error code shows the following message

If access was recently granted, please refresh your credentials.

Code: AuthorizationFailed

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

1 answer

Sort by: Most helpful
  1. Manu Philip 17,271 Reputation points MVP


    It seems like a permission issue for your account to create the resources

    Ensure that, the user has been assigned the appropriate Role-Based Access Control (RBAC) permissions to create the resource.  

    Navigate to your Subscription and select the Access Control (IAM) button and check this

    You can also select "My Permissions" in the left pane to view your current user's permissions.