Why is my virtual machine instance not being created if I use the Resource Group from the Azure portal?

Marouf Ali 270 Reputation points
2024-10-08T16:41:31.86+00:00

Hello Support team,

I tried using the RG in the Azure portal to see if I can create a VM using the Azure CLI command but it doesn't authenticate.

I will copy paste the image here (from Azure portal Concierge account and RG: learn-3acec29d-344b-4c60-9a0e-40c2ae9dc2d1):

User's image

It doesn't seem to generate a VM and it keeps telling "AuthorizationFailed"

Lastly, I just wanted to see this practically, that if I generate a VM using Azure CLI, provided it's the same Resource Group (RG), will that show up in the Az vm list (CLI interface) command as well AND vice-versa, because I think all these have the same backend?

Thank you

Best regards

Marouf

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,744 questions
{count} votes

Accepted answer
  1. SiddeshTN 4,760 Reputation points Microsoft Vendor
    2024-10-29T06:26:49.7766667+00:00

    Hi Marouf Ali,

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

    "AuthorizationFailed" error usually means that your account doesn’t have permission to do this action in the resource group. In the Azure Learn sandbox environment (Concierge subscription), some permissions are limited, so you may not have full access to create all types of resources.

    You could try the following steps to troubleshoot and potentially resolve the issue:

    1.Make sure your account has the "Contributor" role assigned to the resource group. In a sandbox environment, you should typically have the necessary permissions, but if there's a problem with the assignment, it could lead to this error.

    You might find this referral thread helpful as well: Authorization Failed.

    2.If you're using a sandbox provided by Microsoft Learn, there might be a problem with the sandbox session. You can try restarting / reactivating the sandbox environment from the learning module and then run the command again.
    For more assistance, you can refer to this helpful thread: Create an Azure Virtual Machine: Your deployment failed.

    3.Make sure the resource group ID matches exactly what you see in the portal. Sometimes, there are multiple resource groups with similar names in the subscription, so double-check that you’re using the correct one.

    4.If you successfully create a VM using the Azure CLI within the same subscription, it should appear in both the Azure CLI and the Azure Portal. They share the same backend, so any VM created through the CLI will also be visible in the portal, and vice versa.

    Question: Also, I think the RGs in the sandbox are just temporary, so they can't be seen in the Azure portal list of resources. But, in actuality, is it different?

    Yes, you’re correct.
    In the Azure Learn sandbox, resource groups and other resources are temporary and only exist for the duration of your session, so they won’t appear in the main Azure Portal after that. In a regular Azure subscription, resource groups and resources are permanent they remain until you choose to delete them and are visible in the Azure Portal. You have full control over them, including setting permissions, which is different from the sandbox where your permissions are limited.

    Troubleshooting common training issues in Microsoft Learn: https://learn.microsoft.com/en-us/training/support/troubleshooting

    If challenges persist, please attach relevant screenshots for further assistance, ensuring all privacy details are concealed before posting.

    Thank you.

    If you've found the provided answer helpful, please click the "Accept Answer/Upvote" button. This will be beneficial to other members of the Microsoft Q&A forum community.


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.