Lab sandbox failed to create the command from the Lab.

Wu Jinfa 0 Reputation points
2024-06-25T02:14:49.55+00:00

(AuthorizationFailed) The client 'live.com#@hotmail.com' with object id '' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/read' over scope '/subscriptions/4b6f991f-8cd8-4563-a4a8-eae962ec0b5f/resourcegroups/PIP-VNG-Azure-Vnet-1' 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,725 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. SiddeshTN 4,760 Reputation points Microsoft Vendor
    2024-06-25T09:56:15.02+00:00

    Hi Wu Jinfa,

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

    Error message you're encountering indicates a permissions issue with the Azure account you are using. Specifically, it seems that the account does not have the necessary permissions to perform the action Microsoft.Resources/subscriptions/resourcegroups/read on the specified scope /subscriptions/4b6f991f-8cd8-4563-a4a8-eae962ec0b5f/resourcegroups/PIP-VNG-Azure-Vnet-1.

    To resolve this issue, you need to ensure that your Azure account has the correct permissions assigned.
    Here are some steps you can take:

    1.Make sure your Azure account has the necessary permissions to manage Azure resources. Usually, this means having at least the Contributor role with sufficient permissions.

    2.If you've recently updated access, try refreshing your Azure Cloud Shell session or logging out and back into Azure to ensure your credentials are current.

    3.Please confirm that the resource group [sandbox resource group name] exists and that you have the correct name. Ensure you are specifying the correct subscription ID (4b6f991f-8cd8-4563-a4a8-eae962ec0b5f and resource group name (PIP-VNG-Azure-Vnet-1).
    4.If you lack the necessary permissions, please contact your administrator to obtain the required role specific permissions necessary for creating and managing resources within the designated resource group.

    See related:
    Authorization error Subscription authorization

    By addressing these points, you should be able to resolve the AuthorizationFailed error and proceed with your Azure CLI commands successfully. If you need further assistance, feel free to ask.

    If you find this information helpful, please acknowledge by clicking the "Upvote" and "Accept Answer" buttons on the post.

    Thank you.


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.